| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Submitted by: Antoine Brodin <antoine.brodin@laposte.net>
|
|
|
|
|
|
| |
included in the kernel.
MFC after: 0 days
|
|
|
|
|
|
|
|
|
|
| |
sleep lock status while kdb_active, or we risk contending with the
mutex on another CPU, resulting in a panic when using "show
lockedvnods" while in DDB.
MFC after: 3 days
Reviewed by: jhb
Reported by: kris
|
|
|
|
|
|
|
| |
we do not hold.
Glanced at by: phk
MFC after: 3 days
|
|
|
|
|
| |
of ktr slots used. If 'depth' is equal to 0, the whole stack will be
logged, just like before.
|
|
|
|
|
|
| |
structure should have the lk_ prefix.
- Add stack_print(lkp->lk_stack) to the information printed with
lockmgr_printinfo().
|
|
|
|
|
|
|
| |
caller by saving the stack of the last locker/unlocker in lockmgr. We
also put the stack in KTR at the moment.
Contributed by: Antoine Brodin <antoine.brodin@laposte.net>
|
|
|
|
| |
on here.
|
| |
|
|
|
|
|
| |
an assert to help find two strange bugs.
- Remove some nearby spls.
|
|
|
|
|
|
| |
treated as exclusive lock requests.
Sponsored by: Isilon Systems, Inc.
|
|
|
|
|
|
|
|
|
| |
since simply unlocking a mutex does not ensure that one of the waiters
will run and acquire it. We're more likely to reacquire the mutex
before anyone else has a chance. It has also bit me three times now, as
it's not safe to drop the interlock before sleeping in many cases.
Sponsored by: Isilon Systems, Inc.
|
|
|
|
| |
Sponsored by: Isilon Systems, Inc.
|
|
|
|
|
|
|
| |
on DEBUG as ufs will soon grow a dependency on this count.
Discussed with: bde
Sponsored by: Isilon Systems, Inc.
|
|
|
|
|
|
|
| |
lockmgr locks that this thread owns. This is complicated due to
LK_KERNPROC and because lockmgr tolerates unlocking an unlocked lock.
Sponsored by: Isilon Systes, Inc.
|
|
|
|
| |
Sponsored by: Isilon Systems, Inc.
|
|
|
|
|
|
|
|
| |
acquire.
- Correct the condition that causes us to skip apause() to only require
the presence of LK_INTERLOCK.
Sponsored by: Isilon Systems, Inc.
|
|
|
|
|
|
|
|
| |
if the lockmgr interlock is dropped after the caller's interlock
is dropped.
- Change some lockmgr KTRs to be slightly more helpful.
Sponsored By: Isilon Systems, Inc.
|
| |
|
|
|
|
|
|
|
|
|
| |
that the exclusive lock is already held, then we call panic. Don't
clobber internal lock state before panic'ing. This change improves
debugging if this case were to happen.
Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com
Reviewed by: rwatson
|
|
|
|
|
|
| |
LK_HAVE_EXL in both acquire invocations.
MFC after: 5 days
|
|
|
|
|
| |
accordimg to numerous reports. It might get reintroduced some time later
when an exact failure mode is understood better.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and can lead to two threads being granted exclusive access. Check that no one
has the same lock in exclusive mode before proceeding to acquire it.
The LK_WANT_EXCL and LK_WANT_UPGRADE bits act as mini-locks and can block
other threads. Normally this is not a problem since the mini locks are
upgraded to full locks and the release of the locks will unblock the other
threads. However if a thread reset the bits without obtaining a full lock
other threads are not awoken. Add missing wakeups for these cases.
PR: kern/69964
Submitted by: Stephan Uphoff <ups at tree dot com>
Very good catch by: Stephan Uphoff <ups at tree dot com>
|
| |
|
|
|
|
|
|
|
| |
having to acquire sched_lock when manipulating it in lockmgr(), uiomove(),
and uiomove_fromphys().
Reviewed by: jhb
|
|
|
|
| |
diagnostic messages slightly more useful.
|
|
|
|
|
|
| |
the runtime lockmgr initialization code in lockinit() can be eliminated.
Reviewed by: jhb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
multiple mutex pools with different options and sizes. Mutex pools can
be created with either the default sleep mutexes or with spin mutexes.
A dynamically created mutex pool can now be destroyed if it is no longer
needed.
Create two pools by default, one that matches the existing pool that
uses the MTX_NOWITNESS option that should be used for building higher
level locks, and a new pool with witness checking enabled.
Modify the users of the existing mutex pool to use the appropriate pool
in the new implementation.
Reviewed by: jhb
|
| |
|
|
|
|
| |
than KTR_LOCKMGR. lockmgr locks are locks just like other locks.
|
|
|
|
| |
to WITNESS_WARN().
|
|
|
|
|
|
|
|
|
|
| |
- Remove the buftimelock mutex and acquire the buf's interlock to protect
these fields instead.
- Hold the vnode interlock while locking bufs on the clean/dirty queues.
This reduces some cases from one BUF_LOCK with a LK_NOWAIT and another
BUF_LOCK with a LK_TIMEFAIL to a single lock.
Reviewed by: arch, mckusick
|
| |
|
|
|
|
|
| |
Submitted by: david Xu (davidxu@)
Reviewed by: jhb@
|
|
|
|
|
|
|
|
| |
I'm not convinced there is anything major wrong with the patch but
them's the rules..
I am using my "David's mentor" hat to revert this as he's
offline for a while.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
data structure called kse_upcall to manage UPCALL. All KSE binding
and loaning code are gone.
A thread owns an upcall can collect all completed syscall contexts in
its ksegrp, turn itself into UPCALL mode, and takes those contexts back
to userland. Any thread without upcall structure has to export their
contexts and exit at user boundary.
Any thread running in user mode owns an upcall structure, when it enters
kernel, if the kse mailbox's current thread pointer is not NULL, then
when the thread is blocked in kernel, a new UPCALL thread is created and
the upcall structure is transfered to the new UPCALL thread. if the kse
mailbox's current thread pointer is NULL, then when a thread is blocked
in kernel, no UPCALL thread will be created.
Each upcall always has an owner thread. Userland can remove an upcall by
calling kse_exit, when all upcalls in ksegrp are removed, the group is
atomatically shutdown. An upcall owner thread also exits when process is
in exiting state. when an owner thread exits, the upcall it owns is also
removed.
KSE is a pure scheduler entity. it represents a virtual cpu. when a thread
is running, it always has a KSE associated with it. scheduler is free to
assign a KSE to thread according thread priority, if thread priority is changed,
KSE can be moved from one thread to another.
When a ksegrp is created, there is always N KSEs created in the group. the
N is the number of physical cpu in the current system. This makes it is
possible that even an userland UTS is single CPU safe, threads in kernel still
can execute on different cpu in parallel. Userland calls kse_create to add more
upcall structures into ksegrp to increase concurrent in userland itself, kernel
is not restricted by number of upcalls userland provides.
The code hasn't been tested under SMP by author due to lack of hardware.
Reviewed by: julian
|
|
|
|
|
|
|
|
|
|
|
|
| |
converting from individual vnode locks to the snapshot
lock, be sure to pass any waiting processes along to the
new lock as well. This transfer is done by a new function
in the lock manager, transferlockers(from_lock, to_lock);
Thanks to Lamont Granquist <lamont@scriptkiddie.org> for
his help in pounding on snapshots beyond all reason and
finding this deadlock.
Sponsored by: DARPA & NAI Labs.
|
|
|
|
|
|
| |
when DEBUG_LOCKS is defined.
Sponsored by: DARPA & NAI Labs.
|
|
|
|
|
|
| |
are implemented here instead of depending on namespace pollution in
<sys/lock.h>. Fixed nearby include messes (1 disordered include and 1
unused include).
|
| |
|
|
|
|
|
| |
is useful as a last effort in debugging file system deadlocks. This is enabled
via 'options DEBUG_LOCKS'
|
|
|
|
|
|
|
| |
most cases NULL is passed, but in some cases such as network driver locks
(which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.
Tested on: i386, alpha, sparc64
|
| |
|
|
|
|
|
|
|
|
| |
against VM_WAIT in the pageout code. Both fixes involve adjusting
the lockmgr's timeout capability so locks obtained with timeouts do not
interfere with locks obtained without a timeout.
Hopefully MFC: before the 4.5 release
|
|
|
|
|
| |
Replace the manual mutex pool in kern_lock.c (lockmgr locks) with the new API.
Replace the mutexes embedded in sxlocks with the new API.
|
| |
|
|
|
|
| |
trigget the check to make sure we don't initalize a mutex twice.
|
|
|
|
|
| |
are true that curthread can change during this function, then this flag
needs to become a KSE flag, not a thread flag.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.
Sorry john! (your next MFC will be a doosie!)
Reviewed by: peter@freebsd.org, dillon@freebsd.org
X-MFC after: ha ha ha ha
|
|
|
|
| |
possibly panic'ing again.
|