All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] runqueue: show the current pressure as debug messages
@ 2025-07-01  9:53 Antonin Godard
  2025-07-01 21:23 ` [bitbake-devel] " Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Antonin Godard @ 2025-07-01  9:53 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Thomas Petazzoni, Antonin Godard

The current pressure logic only prints pressure information when the
limits set by BB_PRESSURE_* variables are exceeded. But in order to
determine the best pressure limits for a given host, it can be useful to
monitor pressure information after setting BB_PRESSURE_* to the maximum
(1000000) and get a sense of how high the pressure can be.

Add three bb.debug() calls showing that information.

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
 lib/bb/runqueue.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 80f3d3282f..cae4bfa3e5 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -206,6 +206,9 @@ class RunQueueScheduler(object):
                 cpu_pressure = (float(curr_cpu_pressure) - float(self.prev_cpu_pressure)) / tdiff
                 io_pressure = (float(curr_io_pressure) - float(self.prev_io_pressure)) / tdiff
                 memory_pressure = (float(curr_memory_pressure) - float(self.prev_memory_pressure)) / tdiff
+                bb.debug(3, f"Current CPU pressure: {cpu_pressure}")
+                bb.debug(3, f"Current IO pressure: {io_pressure}")
+                bb.debug(3, f"Current Memory pressure: {memory_pressure}")
                 exceeds_cpu_pressure =  self.rq.max_cpu_pressure and cpu_pressure > self.rq.max_cpu_pressure
                 exceeds_io_pressure =  self.rq.max_io_pressure and io_pressure > self.rq.max_io_pressure
                 exceeds_memory_pressure =  self.rq.max_memory_pressure and memory_pressure > self.rq.max_memory_pressure

---
base-commit: f68b513c38fa33c89236efbaab2674a25983d5e1
change-id: 20250701-pressure-messages-b47c882bca4a

Best regards,
--  
Antonin Godard <antonin.godard@bootlin.com>



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-07-14 10:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-01  9:53 [PATCH] runqueue: show the current pressure as debug messages Antonin Godard
2025-07-01 21:23 ` [bitbake-devel] " Richard Purdie
2025-07-02  6:21   ` Antonin Godard
2025-07-14 10:48     ` Quentin Schulz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.