lkml.org 
[lkml]   [2008]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] sched: fair-group: fix a Div0 error of the fair group scheduler
From
Date
On Mon, 2008-04-28 at 16:27 +0800, Miao Xie wrote:

> I'm sorry, I didn't explained clearly.Though echoing ULONG_MAX value into
> cpu.shares causes Div0 error, this error was not caused by the above code.
> It is caused by the following code.
>
> calc_delta_mine()
> ->lw->inv_weight = (WMULT_CONST-lw->weight/2) / (lw->weight+1);
>
> And besides, the Div0 error caused by echoing ULONG_MAX occured on the UP system
> or on SMP system with only one cpu.
>
> So this patch fixes the bug caused by echoing a number which was less than the number
> of processores into the "cpu.shares" file, but doesn't fix the bug caused by echoing
> ULONG_MAX.

Ah, ok. But I guess we run into other problems with weights that heavy,
but we should not crash.

Ok, I'll ACK your initial patch



\
 
 \ /
  Last update: 2008-04-28 10:37    [W:0.226 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site