Re: [RFC][PATCH] O(1) Entitlement Based Scheduler

From: Peter Williams
Date: Tue Mar 02 2004 - 18:39:27 EST


Andy Lutomirski wrote:
<snip>
Ignoring limts, this should be just an exercise in keeping track of shares and eliminating the 1/420 limit in precision. It would take some thought to figure out what nice should do.
> <snip>

I take it from this comment that you would like to see a larger range of shares made available?

The current range (1 to 420) was chosen to allow easy mapping between niceness and shares and so that minimum shares was roughly the same times smaller than the default as the maximum was bigger (i.e. twenty times). One of the restrictions on the number of shares is the dynamic range of the representation of real numbers that we use for our calculations. We use fixed denominator rational numbers with a denominator of 2 to the power of 27. This value was chosen because the maximum (real number) value that we have to be able to cope with in our calculations is 19 and we are limited to using 32 bits because we need to do a divide and 64 bit division is not supported in the kernel on all hardwares (in particular, the IA32 kernels do not support 64 bit division). The other factors that have to be taken into consideration are the half life and the value of HZ (which varies widely depending on the system).

Anyway, I will look at the numbers and see if it's possible to squeeze a larger range of shares in (although it may mean tighter restrictions on half life on some systems).

Peter
--
Dr Peter Williams, Chief Scientist peterw@xxxxxxxxxx
Aurema Pty Limited Tel:+61 2 9698 2322
PO Box 305, Strawberry Hills NSW 2012, Australia Fax:+61 2 9699 9174
79 Myrtle Street, Chippendale NSW 2008, Australia http://www.aurema.com

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