Re: SCHED_IDLE patch

ralf@uni-koblenz.de
Tue, 20 Oct 1998 22:01:05 +0200


On Tue, Oct 20, 1998 at 02:56:13AM +0200, MOLNAR Ingo wrote:

> Also, in RL i'm using nice(10000) and 'nice 10000' frequently, just
> because sometimes i dont remember wether it's 0-40 or -20 to +20 :) If it
> did a sys_nice(+20) it would give very bad interactive performance
> compared to a nice +19 process.

Nice only allows to set relative priorities. It's been a commonly used
and in the UNIX literature documented hack for setting an absolute priority
to do something like

setpri(int prio)
{
prio += 20;

nice(-20);nice(-20);nice(-20);nice(-20);
while(prio > 0) {
nice(prio);
prio -= 20;
}
}

This would nastily interact with the nice +20 SCHED_IDLE thing.

Ralf

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