git: vkernel - Fix problem where cpu-bound user process cannot b

看板DFBSD_commit作者時間14年前 (2011/04/05 08:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit 56f4b22319e18693e334397d363338a8709f7805 Author: Matthew Dillon <dillon@apollo.backplane.com> Date: Mon Apr 4 17:04:12 2011 -0700 vkernel - Fix problem where cpu-bound user process cannot be interrupted * Fix an issue where a cpu-bound user process running in a vkernel cannot be interrupted from within the vkernel. The problem occurs because the timer interrupt was not marked MPSAFE, causing the interrupt thread to hold the MP token which then prevented the thread preemption code from letting the timer interrupt thread preempt the currently running user process. * Fixed by marking the timer interrupt and other vkernel interrupt handlers as being MPSAFE. * This is a problem for the vkernel and not for normal kernel. Normal kernels have a doreti function which 'catches' pending flags on any attempt to return to userland. The vkernel does not, instead relying on the preemption mechanic to catch pending flags. Reported-by: Antonio Huete Jimenez <ahuete.devel@gmail.com> Summary of changes: sys/platform/vkernel/platform/console.c | 3 ++- sys/platform/vkernel/platform/cothread.c | 4 +++- sys/platform/vkernel/platform/kqueue.c | 3 ++- sys/platform/vkernel/platform/shutdown.c | 3 ++- sys/platform/vkernel64/platform/console.c | 3 ++- sys/platform/vkernel64/platform/cothread.c | 4 +++- sys/platform/vkernel64/platform/kqueue.c | 6 ++++-- sys/platform/vkernel64/platform/shutdown.c | 3 ++- 8 files changed, 20 insertions(+), 9 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/56f4b22319e18693e334397d363338a8709f7805 -- DragonFly BSD source repository
文章代碼(AID): #1DccC6Gj (DFBSD_commit)