DragonFly-2.3.0.758.g6179d master sys/kern init_main.c sys/platform/vkernel/i386 trap.c sys/platform/vkernel/platform machintr.c

Matthew Dillon dillon at crater.dragonflybsd.org
Wed Apr 22 14:53:59 PDT 2009


commit 6179d4f3f16b482e364e1bd90002e52b7bee9089
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Wed Apr 22 12:56:37 2009 -0700

    Fix vkernel issues - enable ithread preemption, races, and more.
    
    signalintr() was improperly entering a critical section, preventing
    sched_ithd() from being able to preempt the current thread.  Adjust
    so the code matches the pc32 code.
    
    lwp0 was being assigned cpu_heavy_switch instead of cpu_lwkt_switch,
    which works fine on pc32 but blows up the vkernel if process 0 gets
    preempted, because vkernel LWKT processes are not assigned vmspaces.
    Properly use cpu_lwkt_switch() to fix the problem.
    
    We were not checking for pending reschedule requests when the
    vmspace_ctl() call got interrupted by a signal.  NOTE:  There is
    still a race after the check prior to re-entry into vmspace_ctl()
    which needs to be closed.
    
    Tracked-down-by: corecode, dillon

Summary of changes:
 sys/kern/init_main.c                     |    2 +-
 sys/platform/vkernel/i386/trap.c         |    9 +++++----
 sys/platform/vkernel/platform/machintr.c |    9 ++++++---
 3 files changed, 12 insertions(+), 8 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/6179d4f3f16b482e364e1bd90002e52b7bee9089


-- 
DragonFly BSD source repository





More information about the Commits mailing list