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

Rik van Riel (riel@conectiva.com.br)
Mon, 16 Apr 2001 11:18:56 -0300 (BRST)


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/

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