Re: 2.6.12-rc6-mm1

From: J.A. Magallon
Date: Fri Jun 10 2005 - 19:33:31 EST



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


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/