public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] sched: Fix "divide error: 0000" in find_busiest_group
@ 2011-07-19 20:58 Terry Loftin
  2011-07-19 21:17 ` Peter Zijlstra
  0 siblings, 1 reply; 8+ messages in thread
From: Terry Loftin @ 2011-07-19 20:58 UTC (permalink / raw)
  To: linux-kernel, Ingo Molnar, Peter Zijlstra; +Cc: Bob Montgomery

Correct the protection expression in update_cpu_power() to avoid setting
rq->cpu_power to zero.

Signed-off-by: Terry Loftin <terry.loftin@hp.com>
Signed-off-by: Bob Montgomery <bob.montgomery@hp.com>
---
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 0c26e2d..9c50020 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -2549,7 +2549,7 @@ static void update_cpu_power(struct sched_domain *sd, int cpu)
 	power *= scale_rt_power(cpu);
 	power >>= SCHED_LOAD_SHIFT;

-	if (!power)
+	if ((u32)power == 0)
 		power = 1;

 	cpu_rq(cpu)->cpu_power = power;

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

end of thread, other threads:[~2011-09-01 17:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-19 20:58 [PATCH 1/2] sched: Fix "divide error: 0000" in find_busiest_group Terry Loftin
2011-07-19 21:17 ` Peter Zijlstra
2011-07-19 22:20   ` Terry Loftin
2011-07-19 22:30     ` Peter Zijlstra
2011-07-20  2:26   ` Mike Galbraith
2011-07-20  2:29     ` Peter Zijlstra
2011-07-20  3:32       ` Mike Galbraith
2011-09-01 17:16         ` Simon Kirby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox