DragonFly commits List (threaded) for 2010-12
git: kernel - Fix MP system call performance regression
Author: Matthew Dillon <firstname.lastname@example.org>
Date: Thu Dec 9 23:53:44 2010 -0800
kernel - Fix MP system call performance regression
* The userland scheduler was unconditionally calling lwkt_switch()
via userexit() (i.e. on every system call), creating unnecessary
overhead and possibly also triggering a bsd4 scheduler event
requiring a common spinlock.
* Rearrange the code slightly to reduce instances where lwkt_switch()
is called. We want to try to keep instances where a higher priority
LWKT thread is potentially runnable or when the LWKT fairq accumulator
for the current thread has been exhausted.
* This removes system call overhead multiplication on MP systems. For
example, on a 48-core box system call overhead when all 48 cpus are
busy doing getuid() loops went from 10uS back down to 270nS (which
is near the single-cpu test results).
Summary of changes:
sys/kern/usched_bsd4.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
DragonFly BSD source repository