diff options
authorMartin Jansa <Martin.Jansa@gmail.com>2023-11-10 14:54:37 +0100
committerSteve Sakoman <steve@sakoman.com>2023-12-04 06:03:01 -1000
commit42a1c9fe698a03feb34c5bba223c6e6e0350925b (patch)
parent1050145c3004861ebede4777fd4fbd89d0470716 (diff)
runqueue: show number of currently running bitbake threads when pressure changesyocto-4.0.152022-04.15-kirkstone2.0.15
* it might be a bit confusing as it shows number of threads before making the decision to start more tasks and also it can show only a few tasks running, but not because of pressure when there just aren't many tasks left or wait for their dependencies to be finished first * example output: NOTE: Pressure status changed to CPU: True, IO: None, Mem: None (CPU: 297589.5/200000.0, IO: 5522.2/None, Mem: 779.2/None) - using 7/8 bitbake threads NOTE: Pressure status changed to CPU: False, IO: None, Mem: None (CPU: 196381.2/200000.0, IO: 2667.9/None, Mem: 556.2/None) - using 2/8 bitbake threads Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index e01c496c4..0b6eddd45 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -217,7 +217,7 @@ class RunQueueScheduler(object):
pressure_state = (exceeds_cpu_pressure, exceeds_io_pressure, exceeds_memory_pressure)
pressure_values = (round(cpu_pressure,1), self.rq.max_cpu_pressure, round(io_pressure,1), self.rq.max_io_pressure, round(memory_pressure,1), self.rq.max_memory_pressure)
if hasattr(self, "pressure_state") and pressure_state != self.pressure_state:
- bb.note("Pressure status changed to CPU: %s, IO: %s, Mem: %s (CPU: %s/%s, IO: %s/%s, Mem: %s/%s)" % (pressure_state + pressure_values))
+ bb.note("Pressure status changed to CPU: %s, IO: %s, Mem: %s (CPU: %s/%s, IO: %s/%s, Mem: %s/%s) - using %s/%s bitbake threads" % (pressure_state + pressure_values + (len(self.rq.runq_running.difference(self.rq.runq_complete)), self.rq.number_tasks)))
self.pressure_state = pressure_state
return (exceeds_cpu_pressure or exceeds_io_pressure or exceeds_memory_pressure)
return False