Re: Tiny patch: nice 20 as idle priority

Max (max@Linuz.sns.it)
Mon, 19 Oct 1998 14:48:29 +0200 (MET DST)


On Mon, 19 Oct 1998, Pavel Machek wrote:

>It looks nicely, still...
>
>> @@ -283,6 +285,9 @@
>> weight += 1;
>> }
>>
>> + if (!p->priority)
>> + weight -= 999;
>> +
>> return weight;
>> }
>
>=> weight is likely to be small but probably _not_ -999
>
>> @@ -457,9 +462,10 @@
>> }
>>
>> /* if all runnable processes have "counter == 0", re-calculate counters */
>> - if (!c) {
>> + if (!c || c==-999) {
>
>So you should not test if it is _exactly_ -999.

This is done on purpose.
c == 999 iff all idle-priority tasks have ->counter == 0 and there are no other
runnable tasks.
I don't want linux to recalculate counters only because there are no
normal-priority tasks that can run.

>Not sure I see bug. I may.

There *may* be bugs, but that's not one :)

Massimiliano Ghilardi

----------------------------------------------------------------
| I have yet to meet a person who had a bad experience of Linux. |
| Most have never had an experience. |
----------------------------------------------------------------

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