On Sunday 06 June 2004 17:39, you wrote: > This is an update of the scheduler policy mechanism rewrite using the > infrastructure of the current O(1) scheduler. Slight changes from the > original design require a detailed description. The change to the original > design has enabled all known corner cases to be abolished and cpu > distribution to be much better maintained. It has proven to be stable in my > testing and is ready for more widespread public testing now. > > > Aims: > - Interactive by design rather than have interactivity bolted on. > - Good scalability. > - Simple predictable design. > - Maintain appropriate cpu distribution and fairness. > - Low scheduling latency for normal policy tasks. > - Low overhead. > - Making renicing processes actually matter for CPU distribution (nice 0 > gets 20 times what nice +20 gets) > - Resistant to priority inversion > - More forgiving of poor locking > - Tunable for a server workload or computational tasks > > > Description: > - All tasks start at a dynamic priority based on their nice value. They > run for one RR_INTERVAL (nominally set to 10ms) and then drop one stair > (priority). If they sleep before running again they get to run for 2 > intervals before being demoted a priority and so on until they get all > their intervals at their best priority: 20 intervals for nice 0; 1 interval > for nice +19. > > > - The staircase elevation mechanism can be disabled and all tasks can > simply descend stairs using the sysctl: > > echo 0 > /proc/sys/kernel/interactive > > this has the effect of maintaining cpu distribution much more strictly > according to nice whereas the default mechanism allows bursts of cpu by > interactive tasks before settling to appropriate cpu distribution. > > > - The time tasks are cpu bound can be increased by using the sysctl: > > echo 1 > /proc/sys/kernel/compute > > which extends the RR_INTERVAL to 100ms and disables the staircase elevation > improving conditions for pure computational tasks by optimising cache > benefits and decreasing context switching (gains another 1.5% on > kernbench). > > > Performance: > - All cpu throughput benchmarks show equivalent or better performance than > mainline. Note that disabling the interactive setting actually _worsens_ > some benchmarks because of their dependence on yield() so I don't recommend > disabling it unless you do a comparison first. > - Interactivity is approximately equivalent to mainline 2.6 but with faster > application startup and no known behavioural quirks. > > > Comments and testing welcome. > > fs/proc/array.c | 2 > include/linux/sched.h | 8 > include/linux/sysctl.h | 2 > kernel/sched.c | 676 > +++++++++++++------------------------------------ > kernel/sysctl.c | 16 + > 5 files changed, 212 insertions(+), 492 deletions(-) > > Can be downloaded here: > http://ck.kolivas.org/patches/2.6/2.6.7-rc2/patch-2.6.7-rc2-s6.3 > > and below > Con The same patch modified to apply clean on 2.6-7-rc2-mm2. -- Jan