Messages in this thread | | | Subject | Re: [PATCH] sched: fair-group: fix a Div0 error of the fair group scheduler | From | Peter Zijlstra <> | Date | Mon, 28 Apr 2008 10:33:45 +0200 |
| |
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
| |