Re: [PATCH] sched: fair-group: fix a Div0 error of the fair group scheduler

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Miao Xie
Date: Monday, April 28, 2008 - 1:27 am

on 2008-4-28 13:45 Peter Zijlstra 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.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] sched: fair-group: fix a Div0 error of the fai ..., Miao Xie, (Mon Apr 28, 1:27 am)