Re: [Announce] [patch] Modular Scheduler Core and Completely Fair Scheduler [CFS]

Nick Piggin
2007-04-18T04:47:05Z

On Tue, Apr 17, 2007 at 11:16:54PM +1000, Peter Williams wrote:
> Nick Piggin wrote:
> >I don't like the timeslice based nice in mainline. It's too nasty
> >with latencies. nicksched is far better in that regard IMO.
> >
> >But I don't know how you can assert a particular way is the best way
> >to do something.
>
> I should have added "I may be wrong but I think that ...".
>
> My opinion is based on a lot of experience with different types of
> scheduler design and the observation from gathering scheduling
> statistics while playing with these schedulers that the size of the time
> slices we're talking about is much larger than the CPU chunks most tasks
> use in any one go so time slice size has no real effect on most tasks
> and the faster CPUs become the more this becomes true.

For desktop loads, maybe. But for things that are compute bound, the
cost of context switching I believe still gets worse as CPUs continue
to be able to execute more instructions per cycle, get clocked faster,
and get larger caches.

> >>In that case I'd go O(1) provided that the k factor for the O(1) wasn't
> >>greater than O(logN)'s k factor multiplied by logMaxN.
> >
> >Yes, or even significantly greater around typical large sizes of N.
>
> Yes. In fact its' probably better to use the maximum number of threads
> allowed on the system for N. We know that value don't we?

Well we might be able to work it out by looking at the tunables or
amount of kernel memory available, but I guess it is hard to just
pick a number.

I'll try running a few more benchmarks.