DragonFly-2.3.1.323.g3824f3 master sys/kern lwkt_thread.c sys/pl

看板DFBSD_commit作者時間16年前 (2009/06/20 08:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit 3824f392898599ea8ff8c7709bb9f8537c1b3a78 Author: Matthew Dillon <dillon@apollo.backplane.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 priority). 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 each platform. Reported-by: Many, but especially Hasso Tepper <hasso@estpak.ee> 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(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3824f392898599ea8ff8c7709bb9f8537c1b3a78 -- DragonFly BSD source repository
文章代碼(AID): #1AF2uO00 (DFBSD_commit)