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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]