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

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Apr 4 17:09:17 PDT 2011


commit 56f4b22319e18693e334397d363338a8709f7805
Author: Matthew Dillon <dillon at 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 at 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





More information about the Commits mailing list