Add a sysctl and tunable kern.trap_mpsafe which allows some traps to run
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 22 Nov 2005 01:52:25 +0000 (01:52 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 22 Nov 2005 01:52:25 +0000 (01:52 +0000)
commit9753ab6cfdfd07f312a80a5afb4216adc467c506
treec5f3bbcdf86cd0aff35871c7aabdcabb720eb67b
parent144ce500993aafa6b6d1aa524e6a9649f83af7cf
Add a sysctl and tunable kern.trap_mpsafe which allows some traps to run
without having to hold the MP lock.  The more sophisticated traps, such as
a VM fault, will still obtain the MP lock.  The sysctl is disabled (0)
by default.

The main thing effected by turning this on is T_ASTFLT, which is used to
switch away from a user process to either a kernel thread (non preemptively)
or another user process.  When enabled, switching from a user process to
a kernel thread and back again will not require the MP lock.  However, the
real benefit will not be realized until more kernel threads run without the
MP lock.
sys/i386/i386/trap.c
sys/platform/pc32/i386/trap.c