Scheduler updates for SMP and UP (mainly SMP)
Matthew Dillon
dillon at apollo.backplane.com
Fri Oct 17 09:13:24 PDT 2003
Ok, I've made some major changes to the scheduler. There might be a
little instability but I hope not.
libkvm and kvm utilities (ps, top, systat, etc) must be rebuilt after
updating your includes. If you already have a build world you can use
the 'wmake' utility to build the above utilities
(e.g. cd /usr/lib/libkvm; wmake obj; wmake), and then 'make install'
(not wmake install). wmake is a cute script which is part of the
DragonFly /usr/bin dist which runs make using a buildworld environment
in a subdirectory.
process priorities as shown in 'ps' and 'top' have change radically.
They now run on a linear scale from 0 to 384 or so. e.g. realtime
processes have priorities from 0-127, normal user processes from
128-255, and so forth.
There are a lot of scheduler changes, but the jist is that cpu bound
processes and 'nice' factors should work properly now. Note that the
default nice spread is set such that a nice -20 cpu bound process will
get about 90% of the cpu in the face of nice +0 processes. Note that
a nice -20 process will completely lockout a nice +2 process (or something
like that).
The affinity code is really nice... it accomplishes most of my goals
including, most importantly, on my MP box when I run two nice +20
cpu-bound loops I can still do a nice +0 buildkernel without any
appreciable loss in performance:
372.20 real 227.34 user 93.08 sys with 2x nice +20 loops
354.52 real 229.24 user 84.68 sys without
-Matt
Matthew Dillon
<dillon at xxxxxxxxxxxxx>
More information about the Kernel
mailing list