cvs commit: src/sys/kern sched_ule.c
jeff at FreeBSD.org
Thu Jan 4 04:16:20 PST 2007
jeff 2007-01-04 12:16:19 UTC
FreeBSD src repository
- Only allow the tdq_idx to increase by one each tick rather than up to
the most recently chosen index. This significantly improves nice
behavior. This allows a lower priority thread to run some multiple of
times before the higher priority thread makes it to the front of
the queue. A nice +20 cpu hog now only gets ~5% of the cpu when running
with a nice 0 cpu hog and about 1.5% with a nice -20 hog. A nice
difference of 1 makes a 4% difference in cpu usage between two hogs.
- Track a seperate insert and removal index. When the removal index is
empty it is updated to point at the current insert index.
- Don't remove and re-add a thread to the runq when it is being adjusted
down in priority.
- Pull some conditional code out of sched_tick(). It's looking a bit
Revision Changes Path
1.173 +52 -22 src/sys/kern/sched_ule.c
More information about the cvs-src