Subject: Re: Scheduler project status and further discussion
To: Andrew Doran <ad@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 01/16/2007 09:36:08
On Tue, Jan 16, 2007 at 08:29:10AM +0000, Andrew Doran wrote:
>
> > 1. What to do about priority range? It is currently fixed to
> > 0..127. Different scheduler implementations may want to use a
> > different priority range. But I'm not sure if allowing a variable
> > priority range is really sane. All other systems have a fixed range
> > (FreeBSD has 255, Solaris has 169, Linux has 139), IIRC.
> >
> > Personally, I'd vote to increase MAXPRI at least to 159, which
> > should be fairly enough for any scheduler.
>
> I'm stating the obvious, but I think the main considerations are keeping
> traversal of the queues cheap, while still providing decent granularity.
I agree. The current scheduler only has 32 actual priorities - even though
some of the calculations are done to a larger precision. That is probably
more than enough for non-fixed priorities. After all the 'priority' value
of a non-running process is irrelevant, priorities only matter when there
is more than one runnable process....
David
--
David Laight: david@l8s.co.uk