summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 48788f4aa6..17da1bc1a5 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -200,7 +200,8 @@ class RunQueueScheduler(object):
200 curr_memory_pressure = memory_pressure_fds.readline().split()[4].split("=")[1] 200 curr_memory_pressure = memory_pressure_fds.readline().split()[4].split("=")[1]
201 now = time.time() 201 now = time.time()
202 tdiff = now - self.prev_pressure_time 202 tdiff = now - self.prev_pressure_time
203 if tdiff > 1.0: 203 psi_accumulation_interval = 1.0
204 if tdiff > psi_accumulation_interval:
204 exceeds_cpu_pressure = self.rq.max_cpu_pressure and (float(curr_cpu_pressure) - float(self.prev_cpu_pressure)) / tdiff > self.rq.max_cpu_pressure 205 exceeds_cpu_pressure = self.rq.max_cpu_pressure and (float(curr_cpu_pressure) - float(self.prev_cpu_pressure)) / tdiff > self.rq.max_cpu_pressure
205 exceeds_io_pressure = self.rq.max_io_pressure and (float(curr_io_pressure) - float(self.prev_io_pressure)) / tdiff > self.rq.max_io_pressure 206 exceeds_io_pressure = self.rq.max_io_pressure and (float(curr_io_pressure) - float(self.prev_io_pressure)) / tdiff > self.rq.max_io_pressure
206 exceeds_memory_pressure = self.rq.max_memory_pressure and (float(curr_memory_pressure) - float(self.prev_memory_pressure)) / tdiff > self.rq.max_memory_pressure 207 exceeds_memory_pressure = self.rq.max_memory_pressure and (float(curr_memory_pressure) - float(self.prev_memory_pressure)) / tdiff > self.rq.max_memory_pressure
@@ -209,9 +210,9 @@ class RunQueueScheduler(object):
209 self.prev_memory_pressure = curr_memory_pressure 210 self.prev_memory_pressure = curr_memory_pressure
210 self.prev_pressure_time = now 211 self.prev_pressure_time = now
211 else: 212 else:
212 exceeds_cpu_pressure = self.rq.max_cpu_pressure and (float(curr_cpu_pressure) - float(self.prev_cpu_pressure)) > self.rq.max_cpu_pressure 213 exceeds_cpu_pressure = self.rq.max_cpu_pressure and (float(curr_cpu_pressure) - float(self.prev_cpu_pressure)) / tdiff > self.rq.max_cpu_pressure
213 exceeds_io_pressure = self.rq.max_io_pressure and (float(curr_io_pressure) - float(self.prev_io_pressure)) > self.rq.max_io_pressure 214 exceeds_io_pressure = self.rq.max_io_pressure and (float(curr_io_pressure) - float(self.prev_io_pressure)) / tdiff > self.rq.max_io_pressure
214 exceeds_memory_pressure = self.rq.max_memory_pressure and (float(curr_memory_pressure) - float(self.prev_memory_pressure)) > self.rq.max_memory_pressure 215 exceeds_memory_pressure = self.rq.max_memory_pressure and (float(curr_memory_pressure) - float(self.prev_memory_pressure)) / tdiff > self.rq.max_memory_pressure
215 pressure_state = (exceeds_cpu_pressure, exceeds_io_pressure, exceeds_memory_pressure) 216 pressure_state = (exceeds_cpu_pressure, exceeds_io_pressure, exceeds_memory_pressure)
216 if hasattr(self, "pressure_state") and pressure_state != self.pressure_state: 217 if hasattr(self, "pressure_state") and pressure_state != self.pressure_state:
217 bb.note("Pressure status changed to CPU: %s, IO: %s, Mem: %s" % pressure_state) 218 bb.note("Pressure status changed to CPU: %s, IO: %s, Mem: %s" % pressure_state)