summaryrefslogtreecommitdiffstats
path: root/share/man/man9/sleepqueue.9
Commit message (Collapse)AuthorAgeFilesLines
* MFC r274925: misc mdoc fixes.pluknet2016-09-271-1/+0
|
* MFC r271992lwhsu2014-11-051-42/+8
| | | | | | | | | | | | | Reflect the chanages in sleepqueue.h and subr_sleepqueue.c - Priority argument is introduced to sleepq_*wait* in r177085 - sleepq_calc_signal_retval is removed from implementation - sleepq_catch_signals is internal now MFC r272475 - Bump .Dd Approved by: kevlo
* MFcalloutng:davide2013-03-041-2/+24
| | | | | Dcoument the new functions added to condvar(9), sleep(9), sleepqueue(9) KPIs. Also document recent changes in timeout(9) and eventtimers(4).
* - change "is is" to "is" or "it is"eadler2011-10-161-1/+1
| | | | | | | | - change "the the" to "the" Approved by: lstewart Approved by: sahil (mentor) MFC after: 3 days
* Introduce the new kernel thread called "deadlock resolver".attilio2010-01-091-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | While the name is pretentious, a good explanation of its targets is reported in this 17 months old presentation e-mail: http://lists.freebsd.org/pipermail/freebsd-arch/2008-August/008452.html In order to implement it, the sq_type in sleepqueues is mandatory and not only compiled along with INVARIANTS option. Additively, a new sleepqueue function, sleepq_type() is added, returning the type of the sleepqueue linked to a wchan. Three new sysctls are added in order to configure the thread: debug.deadlkres.slptime_threshold debug.deadlkres.blktime_threshold debug.deadlkres.sleepfreq rappresenting the thresholds for sleep and block time that will lead to a deadlock matching (when exceeded), while the sleepfreq rappresents the number of seconds between 2 consecutive thread runnings. In order to enable the deadlock resolver thread recompile your kernel with the option DEADLKRES. Reviewed by: jeff Tested by: pho, Giovanni Trematerra Sponsored by: Nokia Incorporated, Sandvine Incorporated MFC after: 2 weeks
* Document PBDRY and SLEEPQ_STOP_ON_BDRY.kib2009-12-121-2/+9
| | | | | Requested and reviewed by: attilio MFC after: 3 days
* In current code, threads performing an interruptible sleep (on bothattilio2009-12-121-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sxlock, via the sx_{s, x}lock_sig() interface, or plain lockmgr), will leave the waiters flag on forcing the owner to do a wakeup even when if the waiter queue is empty. That operation may lead to a deadlock in the case of doing a fake wakeup on the "preferred" (based on the wakeup algorithm) queue while the other queue has real waiters on it, because nobody is going to wakeup the 2nd queue waiters and they will sleep indefinitively. A similar bug, is present, for lockmgr in the case the waiters are sleeping with LK_SLEEPFAIL on. In this case, even if the waiters queue is not empty, the waiters won't progress after being awake but they will just fail, still not taking care of the 2nd queue waiters (as instead the lock owned doing the wakeup would expect). In order to fix this bug in a cheap way (without adding too much locking and complicating too much the semantic) add a sleepqueue interface which does report the actual number of waiters on a specified queue of a waitchannel (sleepq_sleepcnt()) and use it in order to determine if the exclusive waiters (or shared waiters) are actually present on the lockmgr (or sx) before to give them precedence in the wakeup algorithm. This fix alone, however doesn't solve the LK_SLEEPFAIL bug. In order to cope with it, add the tracking of how many exclusive LK_SLEEPFAIL waiters a lockmgr has and if all the waiters on the exclusive waiters queue are LK_SLEEPFAIL just wake both queues. The sleepq_sleepcnt() introduction and ABI breakage require __FreeBSD_version bumping. Reported by: avg, kib, pho Reviewed by: kib Tested by: pho
* Document the new return values for sleepq_abort(), sleepq_broadcast(), andjhb2008-08-071-3/+18
| | | | | | sleepq_signal(). Prodded by: attilio
* - Change the description of sleepq_add(), sleepq_broadcast() andgabor2007-09-281-4/+13
| | | | | | | sleepq_signal() to reflect recent changes Submitted by: attilio Approved by: re (bmah)
* Allow threads to atomically release rw and sx locks while waiting for anjhb2007-03-091-5/+5
| | | | | | | | | | | | | | | | | | | event. Locking primitives that support this (mtx, rw, and sx) now each include their own foo_sleep() routine. - Rename msleep() to _sleep() and change it's 'struct mtx' object to a 'struct lock_object' pointer. _sleep() uses the recently added lc_unlock() and lc_lock() function pointers for the lock class of the specified lock to release the lock while the thread is suspended. - Add wrappers around _sleep() for mutexes (mtx_sleep()), rw locks (rw_sleep()), and sx locks (sx_sleep()). msleep() still exists and is now identical to mtx_sleep(), but it is deprecated. - Rename SLEEPQ_MSLEEP to SLEEPQ_SLEEP. - Rewrite much of sleep.9 to not be msleep(9) centric. - Flesh out the 'RETURN VALUES' section in sleep.9 and add an 'ERRORS' section. - Add __nonnull(1) to _sleep() and msleep_spin() so that the compiler will warn if you try to pass a NULL wait channel. The functions already have a KASSERT to that effect.
* Document SLEEPQ_PAUSE.jhb2007-03-091-1/+4
|
* Change sleepq_add(9) argument from 'struct mtx *' to 'struct lock_object *',pjd2006-11-161-3/+3
| | | | | | | | which allows to use it with different kinds of locks. For example it allows to implement Solaris conditions variables which will be used in ZFS port on top of sx(9) locks. Reviewed by: jhb
* Bring API documentation for sleepqueue(9) in sync with the codejkoshy2005-04-191-21/+61
| | | | | | in -current. Reviewed by: ru
* Scheduled mdoc(7) sweep.ru2005-01-121-2/+2
|
* Catch up to recent API changes including the removal of the signal_caughtjhb2004-08-191-12/+25
| | | | | argument to sleepq_timedwait() and the enhancements to the flags argument passed to sleepq_add().
* Spelling fixes.mpp2004-06-211-2/+2
|
* Tiny markup fixes.ru2004-06-161-6/+6
|
* Rewrite sleepqueue manpage to catch up to the new sleep queue interface.jhb2004-03-121-48/+255
|
* mdoc(7) police: finish up the "proc" -> "thread" conversion.ru2002-01-101-2/+2
|
* Update function definitions and required include files to reflectdavidc2001-12-261-1/+1
| | | | | | the current state of the system. Approved by: alfred
* mdoc(7) police: Use the new .In macro for #include statements.ru2001-10-011-2/+2
|
* Add 2001 to copyright.jhb2001-03-091-1/+1
|
* mdoc(7) police: fixed some minor formatting/spelling errors.ru2001-01-241-2/+2
|
* Document the current organization and helper functions used to implementjhb2001-01-231-0/+89
the sleep queues used by msleep/wakeup and friends. Submitted by: sheldonh
OpenPOWER on IntegriCloud