diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2023-09-02 09:23:05 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-09-05 08:13:13 +0100 |
commit | 7e6d7315f9cbc71d085b83f4d5f549e763671951 (patch) | |
tree | 90213ba464da5979f73464b9bde26627fadd6fb6 /bitbake | |
parent | de243647d6c5d735d132d6927721e3c2d82dfea3 (diff) | |
download | poky-7e6d7315f9cbc71d085b83f4d5f549e763671951.tar.gz |
bitbake: runqueue: show number of currently running bitbake threads when pressure changes
* 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
(Bitbake rev: b0b114f31f20c5fcde31e6c308937ad4102dfe0a)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 26c2d5177b..c88d7129ca 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -217,7 +217,7 @@ class RunQueueScheduler(object): | |||
217 | pressure_state = (exceeds_cpu_pressure, exceeds_io_pressure, exceeds_memory_pressure) | 217 | pressure_state = (exceeds_cpu_pressure, exceeds_io_pressure, exceeds_memory_pressure) |
218 | 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) | 218 | 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) |
219 | if hasattr(self, "pressure_state") and pressure_state != self.pressure_state: | 219 | if hasattr(self, "pressure_state") and pressure_state != self.pressure_state: |
220 | 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)) | 220 | 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))) |
221 | self.pressure_state = pressure_state | 221 | self.pressure_state = pressure_state |
222 | return (exceeds_cpu_pressure or exceeds_io_pressure or exceeds_memory_pressure) | 222 | return (exceeds_cpu_pressure or exceeds_io_pressure or exceeds_memory_pressure) |
223 | return False | 223 | return False |