aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorSuresh Siddha <suresh.b.siddha@intel.com>2010-09-13 14:02:21 -0400
committerIngo Molnar <mingo@elte.hu>2010-09-21 07:50:50 -0400
commitf6c3f1686e7ec1dd8725a9a3dcb857dfd0c7a5bf (patch)
treefb0179d1f071dbb857e0ab7f2aace4579deb62c1 /kernel
parente75e863dd5c7d96b91ebbd241da5328fc38a78cc (diff)
sched: Fix nohz balance kick
There's a situation where the nohz balancer will try to wake itself: cpu-x is idle which is also ilb_cpu got a scheduler tick during idle and the nohz_kick_needed() in trigger_load_balance() checks for rq_x->nr_running which might not be zero (because of someone waking a task on this rq etc) and this leads to the situation of the cpu-x sending a kick to itself. And this can cause a lockup. Avoid this by not marking ourself eligible for kicking. Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1284400941.2684.19.camel@sbsiddha-MOBL3.sc.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched_fair.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index a171138a9402..db3f674ca49d 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -3630,7 +3630,7 @@ static inline int nohz_kick_needed(struct rq *rq, int cpu)
3630 if (time_before(now, nohz.next_balance)) 3630 if (time_before(now, nohz.next_balance))
3631 return 0; 3631 return 0;
3632 3632
3633 if (!rq->nr_running) 3633 if (rq->idle_at_tick)
3634 return 0; 3634 return 0;
3635 3635
3636 first_pick_cpu = atomic_read(&nohz.first_pick_cpu); 3636 first_pick_cpu = atomic_read(&nohz.first_pick_cpu);