Subject: Re: Revising CPU usage calculations
To: Jason Thorpe <thorpej@shagadelic.org>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 03/28/2007 20:00:37
On Mon, Mar 26, 2007 at 01:59:22PM -0700, Jason Thorpe wrote:
>
> On Mar 25, 2007, at 6:09 AM, Daniel Sieger wrote:
>
> >Any comments/suggestions?
>
> I'd like to see something that didn't require running over the entire
> process list periodically.
Indeed, IIRC, the current scheduler examines/recalculates the priority
of every process on every time tick (that enters the scheduler...).
In reality it need only look at the priorities of runnable processes
(to see if they should pre-empt the active process). The correct
priority for idle processes can be calculated form the elapsed time
when they are made runnable.
David
--
David Laight: david@l8s.co.uk