Re: 2.6.12-rc6-mm1

J.A. Magallon
2005-06-11T00:32:30Z

On 06.11, Con Kolivas wrote:
>
> Here is what the patch _should_ have been. (*same warnings with this patch
> about math demonstration and untested as should have been posted with the
> earlier one*)
>
> + if (idle == NOT_IDLE || rq->nr_running > 1) {
> + unsigned long prio_bias = 1;
> + if (rq->nr_running)
> + prio_bias = rq->prio_bias / rq->nr_running;
> + source_load *= prio_bias;
> + }
>

Again... sorry, I don't try to be picky, just want to know if its worth or
not...

Would not be better something like:

if (idle == NOT_IDLE || rq->nr_running > 1) {
if (rq->nr_running)
source_load = (source_load*rq->prio_bias) / rq->nr_running;
}

wrt the integer math ? Think of

100*( 5/5) vs 500/5
100*( 6/5) vs 600/5
100*( 7/5) vs 700/5
100*( 8/5) vs 800/5
100*( 9/5) vs 900/5
100*(10/5) vs 1000/5

--
J.A. Magallon <jamagallon()able!es> \ Software is like sex:
werewolf!able!es \ It's better when it's free
Mandriva Linux release 2006.0 (Cooker) for i586
Linux 2.6.11-jam24 (gcc 4.0.0 (4.0.0-3mdk for Mandriva Linux release 2006.0))