git: kernel - Revamp LWKT thread migration

看板DFBSD_commit作者時間15年前 (2011/03/25 06:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit cc9b6223b2987bd6f07ca869665f420285917156 Author: Matthew Dillon <dillon@apollo.backplane.com> Date: Thu Mar 24 14:40:08 2011 -0700 kernel - Revamp LWKT thread migration * Rearrange the handling of TDF_RUNNING, making lwkt_switch() responsible for it instead of the assembly switch code. Adjust td->td_switch() to return the previously running thread. This allows lwkt_switch() to process thread migration between cpus after the thread has been completely and utterly switched out, removing the need to loop on TDF_RUNNING on the target cpu. * Fixes lwkt_setcpu_remote livelock failure * This required major surgery on the core thread switch assembly, testing is needed. I tried to avoid doing this but the livelock problems persisted, so the only solution was to remove the need for the loops that were causing the livelocks. * NOTE: The user process scheduler is still using the old giveaway/acquire method. More work is needed here. Reported-by: "Magliano Andre'" <masterblaster@tiscali.it> Summary of changes: sys/kern/lwkt_thread.c | 135 +++++++++++++++++++-------- sys/kern/usched_bsd4.c | 4 + sys/platform/pc32/i386/exception.s | 12 +++ sys/platform/pc32/i386/swtch.s | 75 ++++++++++------ sys/platform/pc32/include/md_var.h | 7 ++- sys/platform/pc64/include/md_var.h | 2 +- sys/platform/pc64/x86_64/exception.S | 11 +++ sys/platform/pc64/x86_64/swtch.s | 78 ++++++++++------ sys/platform/vkernel/i386/fork_tramp.s | 12 +++ sys/platform/vkernel/i386/swtch.s | 76 ++++++++++------ sys/platform/vkernel/include/md_var.h | 2 +- sys/platform/vkernel64/include/md_var.h | 2 +- sys/platform/vkernel64/x86_64/fork_tramp.s | 11 +++ sys/platform/vkernel64/x86_64/swtch.s | 85 +++++++++++------- sys/sys/proc.h | 4 +- sys/sys/thread.h | 4 +- 16 files changed, 352 insertions(+), 168 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/cc9b6223b2987bd6f07ca869665f420285917156 -- DragonFly BSD source repository
文章代碼(AID): #1DYxycTj (DFBSD_commit)