|
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0 |
|
| #
fa9896e0 |
| 16-Aug-2023 |
Warner Losh <[email protected]> |
Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
|
|
Revision tags: release/13.2.0 |
|
| #
8965b303 |
| 20-Mar-2023 |
Mitchell Horne <[email protected]> |
callout(9): adopt old references to timeout(9)
timeout(9) was removed a couple of years ago; all consumers now use the callout(9) interface.
Explicitly do not bump .Dd anywhere, as this is not a co
callout(9): adopt old references to timeout(9)
timeout(9) was removed a couple of years ago; all consumers now use the callout(9) interface.
Explicitly do not bump .Dd anywhere, as this is not a content or semantic change.
Reviewed by: markj, jhb, Pau Amma <[email protected]> MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39136
show more ...
|
|
Revision tags: release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0, release/12.2.0, release/11.4.0 |
|
| #
fea73412 |
| 24-Dec-2019 |
Conrad Meyer <[email protected]> |
sleep(9), sleepqueue(9): const'ify wchan pointers
_sleep(9), wakeup(9), sleepqueue(9), et al do not dereference or modify the channel pointers provided in any way; they are merely used as intptrs in
sleep(9), sleepqueue(9): const'ify wchan pointers
_sleep(9), wakeup(9), sleepqueue(9), et al do not dereference or modify the channel pointers provided in any way; they are merely used as intptrs into a dictionary structure to match waiters with wakers. Correctly annotate this such that _sleep() and wakeup() may be used on const pointers without invoking ugly patterns like __DECONST(). Plumb const through all of the underlying sleepqueue bits.
No functional change.
Reviewed by: rlibby Discussed with: kib, markj Differential Revision: https://reviews.freebsd.org/D22914
show more ...
|
|
Revision tags: release/12.1.0, release/11.3.0 |
|
| #
f91aa773 |
| 20-Jun-2019 |
Alexander Motin <[email protected]> |
Add wakeup_any(), cheaper wakeup_one() for taskqueue(9).
wakeup_one() and underlying sleepq_signal() spend additional time trying to be fair, waking thread with highest priority, sleeping longest ti
Add wakeup_any(), cheaper wakeup_one() for taskqueue(9).
wakeup_one() and underlying sleepq_signal() spend additional time trying to be fair, waking thread with highest priority, sleeping longest time. But in case of taskqueue there are many absolutely identical threads, and any fairness between them is quite pointless. It makes even worse, since round-robin wakeups not only make previous CPU affinity in scheduler quite useless, but also hide from user chance to see CPU bottlenecks, when sequential workload with one request at a time looks evenly distributed between multiple threads.
This change adds new SLEEPQ_UNFAIR flag to sleepq_signal(), making it wakeup thread that went to sleep last, but no longer in context switch (to avoid immediate spinning on the thread lock). On top of that new wakeup_any() function is added, equivalent to wakeup_one(), but setting the flag. On top of that taskqueue(9) is switchied to wakeup_any() to wakeup its threads.
As result, on 72-core Xeon v4 machine sequential ZFS write to 12 ZVOLs with 16KB block size spend 34% less time in wakeup_any() and descendants then it was spending in wakeup_one(), and total write throughput increased by ~10% with the same as before CPU usage.
Reviewed by: markj, mmacy MFC after: 2 weeks Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D20669
show more ...
|
| #
2e43efd0 |
| 06-Mar-2019 |
John Baldwin <[email protected]> |
Drop "All rights reserved" from my copyright statements.
Reviewed by: rgrimes MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D19485
|
|
Revision tags: release/12.0.0, release/11.2.0, release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0, release/10.3.0, release/10.2.0 |
|
| #
d4d112e3 |
| 23-Nov-2014 |
Joel Dahl <[email protected]> |
Misc mdoc fixes:
- Remove superfluous paragraph macros. - Remove/fix empty or incorrect macros. - Sort sections into conventional order. - Terminate quoted strings properly. - Remove EOL whitespace.
|
|
Revision tags: release/10.1.0 |
|
| #
f6ce1d19 |
| 03-Oct-2014 |
Li-Wen Hsu <[email protected]> |
Bump .Dd
Approved by: kevlo
|
| #
e444e04b |
| 22-Sep-2014 |
Li-Wen Hsu <[email protected]> |
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_sig
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
Differential Revision: https://reviews.freebsd.org/D794 Reviewed by: jhb Approved by: jhb
show more ...
|
|
Revision tags: release/9.3.0, release/10.0.0, release/9.2.0, release/8.4.0 |
|
| #
bf1fc2c2 |
| 04-Mar-2013 |
Davide Italiano <[email protected]> |
MFcalloutng: Dcoument the new functions added to condvar(9), sleep(9), sleepqueue(9) KPIs. Also document recent changes in timeout(9) and eventtimers(4).
|
|
Revision tags: release/9.1.0, release/8.3.0_cvs, release/8.3.0, release/9.0.0 |
|
| #
36daf049 |
| 16-Oct-2011 |
Eitan Adler <[email protected]> |
- change "is is" to "is" or "it is" - change "the the" to "the"
Approved by: lstewart Approved by: sahil (mentor) MFC after: 3 days
|
|
Revision tags: release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0, release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0 |
|
| #
93a45f0f |
| 25-Jan-2010 |
Attilio Rao <[email protected]> |
MFC r201879: Introduce the new kernel thread called "deadlock resolver". It is used in order to seek within the threads state and heuristically understand if there is any deadlock happening.
In orde
MFC r201879: Introduce the new kernel thread called "deadlock resolver". It is used in order to seek within the threads state and heuristically understand if there is any deadlock happening.
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.
Sponsored by: Sandvine Incorporated
show more ...
|
| #
702748e9 |
| 18-Jan-2010 |
Attilio Rao <[email protected]> |
MFC r200447,201703,201709-201710: In current code, threads performing an interruptible sleep will leave the waiters flag on forcing the owner to do a wakeup even when the waiter queue is empty. That
MFC r200447,201703,201709-201710: In current code, threads performing an interruptible sleep will leave the waiters flag on forcing the owner to do a wakeup even when the waiter queue is empty. That operation may lead to a deadlock in the case of doing a fake wakeup on the "preferred" 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.
Add a sleepqueue interface which does report the actual number of waiters on a specified queue of a waitchannel and track if at least one sleepfail waiter is present or not. In presence of this or empty "preferred" queue, wakeup both waiters queues.
Discussed with: kib Tested by: Pete French <petefrench at ticketswitch dot com>, Justin Head <justin at encarnate dot com>
show more ...
|
| #
2709ebf1 |
| 17-Dec-2009 |
Konstantin Belousov <[email protected]> |
MFC r200450: Document PBDRY and SLEEPQ_STOP_ON_BDRY.
|
| #
f7829d0d |
| 09-Jan-2010 |
Attilio Rao <[email protected]> |
Introduce the new kernel thread called "deadlock resolver". While the name is pretentious, a good explanation of its targets is reported in this 17 months old presentation e-mail: http://lists.freebs
Introduce the new kernel thread called "deadlock resolver". 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
show more ...
|
| #
ec897c88 |
| 12-Dec-2009 |
Konstantin Belousov <[email protected]> |
Document PBDRY and SLEEPQ_STOP_ON_BDRY.
Requested and reviewed by: attilio MFC after: 3 days
|
| #
2028867d |
| 12-Dec-2009 |
Attilio Rao <[email protected]> |
In current code, threads performing an interruptible sleep (on both 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 e
In current code, threads performing an interruptible sleep (on both 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
show more ...
|
|
Revision tags: release/8.0.0_cvs, release/8.0.0, release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0 |
|
| #
2cdcea5e |
| 07-Aug-2008 |
John Baldwin <[email protected]> |
Document the new return values for sleepq_abort(), sleepq_broadcast(), and sleepq_signal().
Prodded by: attilio
|
|
Revision tags: release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0 |
|
| #
9d77e05a |
| 28-Sep-2007 |
Gabor Kovesdan <[email protected]> |
- Change the description of sleepq_add(), sleepq_broadcast() and sleepq_signal() to reflect recent changes
Submitted by: attilio Approved by: re (bmah)
|
| #
e7573e7a |
| 09-Mar-2007 |
John Baldwin <[email protected]> |
Allow threads to atomically release rw and sx locks while waiting for an event. Locking primitives that support this (mtx, rw, and sx) now each include their own foo_sleep() routine. - Rename msleep
Allow threads to atomically release rw and sx locks while waiting for an 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.
show more ...
|
| #
32d2c58b |
| 09-Mar-2007 |
John Baldwin <[email protected]> |
Document SLEEPQ_PAUSE.
|
|
Revision tags: release/6.2.0_cvs, release/6.2.0 |
|
| #
7ee07175 |
| 16-Nov-2006 |
Pawel Jakub Dawidek <[email protected]> |
Change sleepq_add(9) argument from 'struct mtx *' to 'struct lock_object *', which allows to use it with different kinds of locks. For example it allows to implement Solaris conditions variables whic
Change sleepq_add(9) argument from 'struct mtx *' to 'struct lock_object *', 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
show more ...
|
|
Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0, release/5.4.0_cvs, release/5.4.0 |
|
| #
265cd337 |
| 19-Apr-2005 |
Joseph Koshy <[email protected]> |
Bring API documentation for sleepqueue(9) in sync with the code in -current.
Reviewed by: ru
|
|
Revision tags: release/4.11.0_cvs, release/4.11.0 |
|
| #
c0854fb7 |
| 12-Jan-2005 |
Ruslan Ermilov <[email protected]> |
Scheduled mdoc(7) sweep.
|
|
Revision tags: release/5.3.0_cvs, release/5.3.0 |
|
| #
68fdba2e |
| 19-Aug-2004 |
John Baldwin <[email protected]> |
Catch up to recent API changes including the removal of the signal_caught argument to sleepq_timedwait() and the enhancements to the flags argument passed to sleepq_add().
|
| #
2988974b |
| 21-Jun-2004 |
Mike Pritchard <[email protected]> |
Spelling fixes.
|