diff mbox series

[2/2] server/process: Decrease idle/main loop frequency

Message ID 20241105150628.2827698-2-richard.purdie@linuxfoundation.org
State Accepted, archived
Commit 8d8e17af8619c976819170c9d5d9a686a666c317
Headers show
Series [1/2] server/process: Don't send heartbeats when no idle functions | expand

Commit Message

Richard Purdie Nov. 5, 2024, 3:06 p.m. UTC
The idle and main loops have socket select calls to know when to execute.
This means we can increase the normal timeout frequency since this is
just a fall back and have some small efficiency gains.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 lib/bb/server/process.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Mathieu Dubois-Briand Nov. 5, 2024, 4:40 p.m. UTC | #1
On Tue, Nov 05, 2024 at 03:06:28PM +0000, Richard Purdie wrote:
> The idle and main loops have socket select calls to know when to execute.
> This means we can increase the normal timeout frequency since this is
> just a fall back and have some small efficiency gains.
> 
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Hi Richard,

This patch set does not apply cleanly on master nor on my master-next. I
believe it misses the "Merge a function to simplfy code" from your
master-next branch.
Richard Purdie Nov. 5, 2024, 10:29 p.m. UTC | #2
On Tue, 2024-11-05 at 17:40 +0100, Mathieu Dubois-Briand wrote:
> On Tue, Nov 05, 2024 at 03:06:28PM +0000, Richard Purdie wrote:
> > The idle and main loops have socket select calls to know when to
> > execute.
> > This means we can increase the normal timeout frequency since this
> > is
> > just a fall back and have some small efficiency gains.
> > 
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> 
> Hi Richard,
> 
> This patch set does not apply cleanly on master nor on my master-
> next. I
> believe it misses the "Merge a function to simplfy code" from your
> master-next branch.

Sorry, I've sent that one as well. I need to stop missing a single
patch like this!

Cheers,

Richard
diff mbox series

Patch

diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index b627ae0ab6..4b35be62cd 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -329,7 +329,7 @@  class ProcessServer():
                 bb.error("Idle thread terminated, main thread exiting too")
                 self.quit = True
 
-            nextsleep = 0.1
+            nextsleep = 1.0
             if self.xmlrpc:
                 nextsleep = self.xmlrpc.get_timeout(nextsleep)
             try:
@@ -439,7 +439,7 @@  class ProcessServer():
                 self.idle_cond.notify_all()
 
         while not self.quit:
-            nextsleep = 0.1
+            nextsleep = 1.0
             fds = []
 
             with bb.utils.lock_timeout(self._idlefuncsLock):