Re: [test-PATCH] Re: [QUESTION] 2.4.x nice level

Rik van Riel
2001-04-16T14:19:48Z

On Thu, 12 Apr 2001, Pavel Machek wrote:

> > One rule of optimization is to move any code you can outside the loop.
> > Why isn't the nice_to_ticks calculation done when nice is changed
> > instead of EVERY recalc.? I guess another way to ask this is, who needs
>
> This way change is localized very nicely, and it is "obviously right".

Except for two obvious things:

1. we need to load the nice level anyway
2. a shift takes less cycles than a load on most
CPUs

Rik
--
Virtual memory is like a game you can't win;
However, without VM there's truly nothing to lose...

http://www.surriel.com/
http://www.conectiva.com/ http://distro.conectiva.com.br/