DragonFly BSD
DragonFly commits List (threaded) for 2011-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

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


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 4 Apr 2011 17:08:35 -0700 (PDT)

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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]