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

Ingo Molnar
2007-04-17T10:02:47Z

* William Lee Irwin III <wli@holomorphy.com> wrote:

> On Tue, Apr 17, 2007 at 11:24:22AM +0200, Ingo Molnar wrote:
>
> > until now the main approach for nice levels in Linux was always:
> > "implement your main scheduling logic for nice 0 and then look for
> > some low-overhead method that can be glued to it that does something
> > that behaves like nice levels". Feel free to turn that around into a
> > more natural approach, but the algorithm should remain fairly simple
> > i think.
>
> Part of my insistence was because it seemed to be relatively close to
> a one-liner, though I'm not entirely sure what particular computation
> to use to handle the signedness of the keys. I guess I could pick some
> particular nice semantics myself and then sweep the extant schedulers
> to use them after getting a testcase hammered out.

i'd love to have a oneliner solution :-)

wrt. signedness: note that in v2 i have made rq_running signed, and most
calculations (especially those related to nice) are signed values. (On
64-bit systems this all isnt a big issue - most of the arithmetics
gymnastics in CFS are done to keep deltas within 32 bits, so that
divisions and multiplications are sane.)

Ingo