diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-07-13 11:50:19 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-07-19 19:39:48 +0100 |
commit | 24fe236a102c4814c7a0fb460758dff0369065ff (patch) | |
tree | 8a0ea41e27a12fc6278334144c60c86a7a71450e | |
parent | 8ab99dd855fe7809f28761c61dd3d78a7bf8afce (diff) | |
download | poky-24fe236a102c4814c7a0fb460758dff0369065ff.tar.gz |
bitbake: runqueue: Add pressure change logging
It is currently hard to tell when bitbake is throttling task execution
due to system pressure changes. Add notes to the console output to make
this clearer, only generating output when the values change.
(Bitbake rev: a6056599922fb2fe3f54c5c86ac7ea604f469adc)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 241a746ebb..020ad210d8 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -212,6 +212,10 @@ class RunQueueScheduler(object): | |||
212 | exceeds_cpu_pressure = self.rq.max_cpu_pressure and (float(curr_cpu_pressure) - float(self.prev_cpu_pressure)) > self.rq.max_cpu_pressure | 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_io_pressure = self.rq.max_io_pressure and (float(curr_io_pressure) - float(self.prev_io_pressure)) > self.rq.max_io_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_memory_pressure = self.rq.max_memory_pressure and (float(curr_memory_pressure) - float(self.prev_memory_pressure)) > self.rq.max_memory_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 | pressure_state = (exceeds_cpu_pressure, exceeds_io_pressure, exceeds_memory_pressure) | ||
216 | 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 | self.pressure_state = pressure_state | ||
215 | return (exceeds_cpu_pressure or exceeds_io_pressure or exceeds_memory_pressure) | 219 | return (exceeds_cpu_pressure or exceeds_io_pressure or exceeds_memory_pressure) |
216 | return False | 220 | return False |
217 | 221 | ||