| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
missing from the SP variant of mtx_enter() and mtx_enter_try().
mtx_leave() was correct already.
Prompted by and OK patrick@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reduce code clutter by removing the file name and line number output
from witness(4). Typically it is easy enough to locate offending locks
using the stack traces that are shown in lock order conflict reports.
Tricky cases can be tracked using sysctl kern.witness.locktrace=1 .
This patch additionally removes the witness(4) wrapper for mutexes.
Now each mutex implementation has to invoke the WITNESS_*() macros
in order to utilize the checker.
Discussed with and OK dlg@, OK mpi@
|
|
|
|
|
|
|
| |
on spinning even if `db_active' or `panicstr' has been set. The new
mutex also disables IPIs in the critical section.
OK mpi@ patrick@
|
|
|
|
|
|
|
|
|
|
|
|
| |
be used in the routine because there is no subsequent atomic operation.
membar_exit() has to be used instead.
The mistake has not caused problems because on most platforms
membar_exit_before_atomic() is membar_exit(). Only amd64 and i386 have
a dedicated membar_exit_before_atomic(), and their exit barriers are
no-ops.
OK dlg@
|
|
|
|
|
|
| |
building a uniprocessor kernel with WITNESS.
OK mpi@
|
|
|
|
| |
ok visa@
|
|
|
|
|
|
|
|
|
| |
system time.
Introduce a new CP_SPIN "scheduler state" and modify userland tools
to display the % of timer a CPU spents spinning.
Based on a diff from jmatthew@, ok pirofti@, bluhm@, visa@, deraadt@
|
|
|
|
|
|
|
|
| |
kernels.
While here sync all MP_LOCKDEBUG/while loops.
ok mlarkin@, visa@
|
|
|
|
| |
ok deraadt@
|
|
|
|
|
|
| |
Should prevent a panic after panic reported by mlarkin@.
ok mlarkin@, visa@
|
|
|
|
|
|
|
|
|
|
|
| |
Extend the logic already present for panic() to any DDB-related
operation such that if ddb(4) is entered because of a fault or
other trap it is still possible to call 'boot reboot'.
While here stop printing splassert() messages as well, to not fill
the buffer.
ok visa@, deraadt@
|
|
|
|
| |
include it.
|
|
|
|
|
|
| |
indirect inclusion. Fixes non-MULTIPROCESSOR WITNESS build.
ok visa@ mpi@
|
| |
|
| |
|
|
|
|
| |
This will prevent a copyright-o-rama in kern_lock.c
|
|
|
|
|
|
|
|
| |
In 2016 natano@ removed the last two functions remaining from the CSRG
time: lockinit() and lockstatus(). At that time they were already wrappers
around recursive rwlocks functions from thib@ that tedu@ committed in 2013.
ok deraadt@
|
|
|
|
|
|
| |
Archs not yet converted can to the jump by defining __USE_MI_MUTEX.
ok visa@
|
|
|
|
|
|
|
| |
extend ddb(4) "ps /o" output to print which CPU is currently holding the
KERNEL_LOCK().
Tested by dhill@, ok visa@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reduces code duplication and makes it easier to instrument
lock primitives.
The MI mplock uses the ticket lock code that has been in use
on amd64, i386 and sparc64. These are the architectures that now
switch to the MI code.
The lock_machdep.c files are unhooked from the build but not
removed yet, in case something goes wrong.
OK mpi@, kettenis@
|
|
|
|
| |
ok visa@
|
|
|
|
| |
without <machine/mplock.h>.
|
| |
|
|
|
|
|
|
|
|
| |
trivial change to use rrw locks instead. All it needs is LK_* defines
for the RW_* flags.
tested by naddy and sthen on package building infrastructure
input and ok jmc mpi tedu
|
|
|
|
| |
ok mpi@ kspillner@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a new assertion macro, KERNEL_ASSERT_LOCKED(), to assert that
kernel_lock is held. In the long process of removing kernel_lock, there will
be a lot (hundreds or thousands) of use of this; virtually almost all functions
in !MP-safe subsystems should have this assertion. Thus this assertion should
have a short, good name.
Not only that "KERNEL_ASSERT_LOCKED" is consistent with other KERNEL_* and
SCHED_ASSERT_LOCKED() macros.
Input from dlg@ guenther@ kettenis@.
OK dlg@ guenther@
|
|
|
|
|
|
|
| |
locked by a different thread. Teach lockstatus() to return LK_EXCLUSIVE
if an exclusive lock is held by some other thread.
ok beck@ tedu@
|
| |
|
| |
|
| |
|
|
|
|
|
| |
originally by thib.
ok deraadt jsing and anyone who tested
|
|
|
|
|
| |
.h files to pull it in, if needed
ok tedu
|
|
|
|
|
|
|
|
| |
the lock, but a change in member ordering meant it was using the same
address. Explicitly use different members instead of mixing address
of member and address of the lock itself.
ok miod@
|
|
|
|
|
|
|
| |
KERNEL_PROC_LOCK -> KERNEL_LOCK
KERNEL_PROC_UNLOCK -> KERNEL_UNLOCK
oga@ ok
|
|
|
|
|
|
|
|
|
|
|
|
| |
biglock in mi_switch and just check if we're holding the biglock.
The idea is that the first entry point into the kernel uses KERNEL_PROC_LOCK
and recursive calls use KERNEL_LOCK. This assumption is violated in at
least one place and has been causing confusion for lots of people.
Initial bug report and analysis from Pedro.
kettenis@ beck@ oga@ thib@ dlg@ ok
|
|
|
|
|
|
| |
where there is almost nothing left to them, so that we can continue getting
rid of them
ok oga
|
|
|
|
|
| |
from Brad Tilley <brad at 16systems dot com>;
ok oga@
|
|
|
|
| |
ok blambert@
|
|
|
|
|
|
| |
No binary change.
ok otto@
|
| |
|
|
|
|
|
|
| |
wich gets set and never checked etc...
ok art@,tedu@
|
| |
|
| |
|
|
|
|
|
|
| |
flag. This effectively makes the simplelock argument to lockmgr() fluff.
ok miod@
|
|
|
|
| |
ok pedro@ art@
|
|
|
|
|
|
|
|
|
|
|
|
| |
it's a good idea to use atomic.h operations on it. This mechanic
change updates all bit operations on p_flag to atomic_{set,clear}bits_int.
Only exception is that P_OWEUPC is set by MI code before calling
need_proftick and it's automatically cleared by ADDUPC. There's
no reason for MD handling of that flag since everyone handles it the
same way.
kettenis@ ok
|
|
|
|
| |
ok kettenis@ cloder@ tom@ henning@
|
|
|
|
|
|
|
|
|
|
|
| |
- LK_EXCLUPGRADE is never used.
- LK_REENABLE is never used.
- LK_SETRECURSE is never used. Because of this, the lk_recurselevel
field is always zero, so it can be removed to.
- the spinlock version (and LK_SPIN) is never used, since it was decided
to use different locking structure for MP-safe protection.
Tested by many
|
|
|
|
| |
from thordur i. bjornsson;
|
|
|
|
| |
'go for it' deraadt@
|