DragonFly commits List (threaded) for 2009-06
DragonFly-188.8.131.523.g3824f3 master sys/kern lwkt_thread.c sys/platform/pc32/i386 trap.c sys/platform/pc64/amd64 trap.c sys/platform/vkernel/i386 trap.c sys/sys thread.h thread2.h sys/vfs/hammer hammer_signal.c
Author: Matthew Dillon <email@example.com>
Date: Fri Jun 19 17:04:31 2009 -0700
HAMMER (and kernel) - Fix cpu-bound kernel thread issue.
* HAMMER now calls a new kernel function, lwkt_user_yield(), in its
ioctl-based loops (such as the reblocker).
* Add a new LWKT function called lwkt_user_yield(). This function
causes a kernel thread to yield at user priority (instead of kernel
This function also deals with a nasty issue related to the MP lock.
A cpu-bound kernel thread holding the MP lock can prevent other
cpus from serving interrupt threads which also need the MP lock.
Detect the condition and release the MP lock for 10uS to give the
other cpus a chance to pick it up. This is a bad hack but it
actually does work.
* Move passive_release() from MD code to kern/lwkt_thread.c and add
an inline for the passive release recovery function. Adjust all
platforms to use the new API instead of rolling the same code for
Reported-by: Many, but especially Hasso Tepper <firstname.lastname@example.org>
Summary of changes:
sys/kern/lwkt_thread.c | 83 ++++++++++++++++++++++++++++++++++++++
sys/platform/pc32/i386/trap.c | 22 +---------
sys/platform/pc64/amd64/trap.c | 24 +----------
sys/platform/vkernel/i386/trap.c | 22 +---------
sys/sys/thread.h | 2 +
sys/sys/thread2.h | 15 +++++++
sys/vfs/hammer/hammer_signal.c | 1 +
7 files changed, 107 insertions(+), 62 deletions(-)
DragonFly BSD source repository