[lkml]   [2012]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] scheduler: domain: correctly initialize 'next_balance' in 'nohz' idle balancer
scheduler: domain: init next_balance in nohz_idle_balancer with jiffies

The 'next_balance' field of 'nohz' idle balancer must be initialized
to jiffies. Since jiffies is initialized to negative 300 seconds the
'nohz' idle balancer does not run for the first 300s (5mins) after
bootup. If no new processes are spawed or no idle cycles happen, the
load on the cpus will remain unbalanced for that duration.

Signed-off-by: Diwakar Tundlam <>
1 files changed, 1 insertions(+), 0 deletions(-)

diff -up sched/fair.c{.orig,}
--- sched/fair.c.orig 2012-03-07 08:33:03.000000000 -0800
+++ sched/fair.c 2012-03-07 13:50:30.787265795 -0800
@@ -5614,6 +5614,7 @@ __init void init_sched_fair_class(void)
open_softirq(SCHED_SOFTIRQ, run_rebalance_domains);

+ nohz.next_balance = jiffies;
zalloc_cpumask_var(&nohz.idle_cpus_mask, GFP_NOWAIT);
cpu_notifier(sched_ilb_notifier, 0);

 \ /
  Last update: 2012-03-07 23:47    [W:0.069 / U:0.400 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site