lkml.org 
[lkml]   [2011]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] sched: Fix "divide error: 0000" in find_busiest_group
From
Date
On Tue, 2011-07-19 at 14:58 -0600, Terry Loftin wrote:
> Correct the protection expression in update_cpu_power() to avoid setting
> rq->cpu_power to zero.

Firstly you fail to mention what kernel this is again, secondly this
should never happen in the first place, so this fix is wrong. At best it
papers over another bug.

> 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;





\
 
 \ /
  Last update: 2011-07-19 23:15    [W:0.048 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site