<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in sleepqueue.9</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>fa9896e0 - Remove $FreeBSD$: two-line nroff pattern</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/share/man/man9/sleepqueue.9#fa9896e0</link>
        <description>Remove $FreeBSD$: two-line nroff patternRemove /^\.\\&quot;\n\.\\&quot;\s*\$FreeBSD\$$\n/

            List of files:
            /freebsd-14.2/share/man/man9/sleepqueue.9</description>
        <pubDate>Wed, 16 Aug 2023 17:55:10 +0000</pubDate>
        <dc:creator>Warner Losh &lt;imp@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>8965b303 - callout(9): adopt old references to timeout(9)</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/share/man/man9/sleepqueue.9#8965b303</link>
        <description>callout(9): adopt old references to timeout(9)timeout(9) was removed a couple of years ago; all consumers now use thecallout(9) interface.Explicitly do not bump .Dd anywhere, as this is not a content orsemantic change.Reviewed by:	markj, jhb, Pau Amma &lt;pauamma@gundo.com&gt;MFC after:	1 weekSponsored by:	The FreeBSD FoundationDifferential Revision:	https://reviews.freebsd.org/D39136

            List of files:
            /freebsd-14.2/share/man/man9/sleepqueue.9</description>
        <pubDate>Mon, 20 Mar 2023 20:00:24 +0000</pubDate>
        <dc:creator>Mitchell Horne &lt;mhorne@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>fea73412 - sleep(9), sleepqueue(9): const&apos;ify wchan pointers</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/share/man/man9/sleepqueue.9#fea73412</link>
        <description>sleep(9), sleepqueue(9): const&apos;ify wchan pointers_sleep(9), wakeup(9), sleepqueue(9), et al do not dereference or modify thechannel pointers provided in any way; they are merely used as intptrs into adictionary structure to match waiters with wakers.  Correctly annotate thissuch that _sleep() and wakeup() may be used on const pointers withoutinvoking ugly patterns like __DECONST().  Plumb const through all of theunderlying sleepqueue bits.No functional change.Reviewed by:	rlibbyDiscussed with:	kib, markjDifferential Revision:	https://reviews.freebsd.org/D22914

            List of files:
            /freebsd-14.2/share/man/man9/sleepqueue.9</description>
        <pubDate>Tue, 24 Dec 2019 16:19:33 +0000</pubDate>
        <dc:creator>Conrad Meyer &lt;cem@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>f91aa773 - Add wakeup_any(), cheaper wakeup_one() for taskqueue(9).</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/share/man/man9/sleepqueue.9#f91aa773</link>
        <description>Add wakeup_any(), cheaper wakeup_one() for taskqueue(9).wakeup_one() and underlying sleepq_signal() spend additional time tryingto be fair, waking thread with highest priority, sleeping longest time.But in case of taskqueue there are many absolutely identical threads, andany fairness between them is quite pointless.  It makes even worse, sinceround-robin wakeups not only make previous CPU affinity in scheduler quiteuseless, but also hide from user chance to see CPU bottlenecks, whensequential workload with one request at a time looks evenly distributedbetween multiple threads.This change adds new SLEEPQ_UNFAIR flag to sleepq_signal(), making it wakeupthread that went to sleep last, but no longer in context switch (to avoidimmediate 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 itsthreads.As result, on 72-core Xeon v4 machine sequential ZFS write to 12 ZVOLswith 16KB block size spend 34% less time in wakeup_any() and descendantsthen it was spending in wakeup_one(), and total write throughput increasedby ~10% with the same as before CPU usage.Reviewed by:	markj, mmacyMFC after:	2 weeksSponsored by:	iXsystems, Inc.Differential Revision:	https://reviews.freebsd.org/D20669

            List of files:
            /freebsd-14.2/share/man/man9/sleepqueue.9</description>
        <pubDate>Thu, 20 Jun 2019 01:15:33 +0000</pubDate>
        <dc:creator>Alexander Motin &lt;mav@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>2e43efd0 - Drop &quot;All rights reserved&quot; from my copyright statements.</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/share/man/man9/sleepqueue.9#2e43efd0</link>
        <description>Drop &quot;All rights reserved&quot; from my copyright statements.Reviewed by:	rgrimesMFC after:	1 monthDifferential Revision:	https://reviews.freebsd.org/D19485

            List of files:
            /freebsd-14.2/share/man/man9/sleepqueue.9</description>
        <pubDate>Wed, 06 Mar 2019 22:11:45 +0000</pubDate>
        <dc:creator>John Baldwin &lt;jhb@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>d4d112e3 - Misc mdoc fixes:</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/share/man/man9/sleepqueue.9#d4d112e3</link>
        <description>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.

            List of files:
            /freebsd-14.2/share/man/man9/sleepqueue.9</description>
        <pubDate>Sun, 23 Nov 2014 21:00:00 +0000</pubDate>
        <dc:creator>Joel Dahl &lt;joel@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>f6ce1d19 - Bump .Dd</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/share/man/man9/sleepqueue.9#f6ce1d19</link>
        <description>Bump .DdApproved by:	kevlo

            List of files:
            /freebsd-14.2/share/man/man9/sleepqueue.9</description>
        <pubDate>Fri, 03 Oct 2014 15:03:44 +0000</pubDate>
        <dc:creator>Li-Wen Hsu &lt;lwhsu@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>e444e04b - Reflect the chanages in sleepqueue.h and subr_sleepqueue.c</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/share/man/man9/sleepqueue.9#e444e04b</link>
        <description>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 nowDifferential Revision:	https://reviews.freebsd.org/D794Reviewed by:	jhbApproved by:	jhb

            List of files:
            /freebsd-14.2/share/man/man9/sleepqueue.9</description>
        <pubDate>Mon, 22 Sep 2014 19:14:27 +0000</pubDate>
        <dc:creator>Li-Wen Hsu &lt;lwhsu@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>bf1fc2c2 - MFcalloutng:</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/share/man/man9/sleepqueue.9#bf1fc2c2</link>
        <description>MFcalloutng:Dcoument the new functions added to condvar(9), sleep(9), sleepqueue(9)KPIs. Also document recent changes in timeout(9) and eventtimers(4).

            List of files:
            /freebsd-14.2/share/man/man9/sleepqueue.9</description>
        <pubDate>Mon, 04 Mar 2013 19:10:39 +0000</pubDate>
        <dc:creator>Davide Italiano &lt;davide@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>36daf049 - - change &quot;is is&quot; to &quot;is&quot; or &quot;it is&quot;</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/share/man/man9/sleepqueue.9#36daf049</link>
        <description>- change &quot;is is&quot; to &quot;is&quot; or &quot;it is&quot;- change &quot;the the&quot; to &quot;the&quot;Approved by:	lstewartApproved by:	sahil (mentor)MFC after:	3 days

            List of files:
            /freebsd-14.2/share/man/man9/sleepqueue.9</description>
        <pubDate>Sun, 16 Oct 2011 14:30:28 +0000</pubDate>
        <dc:creator>Eitan Adler &lt;eadler@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>93a45f0f - MFC r201879:</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/share/man/man9/sleepqueue.9#93a45f0f</link>
        <description>MFC r201879:Introduce the new kernel thread called &quot;deadlock resolver&quot;.It is used in order to seek within the threads state and heuristicallyunderstand if there is any deadlock happening.In order to implement it, the sq_type in sleepqueues is mandatory and notonly compiled along with INVARIANTS option. Additively, a new sleepqueuefunction, sleepq_type() is added, returning the type of the sleepqueuelinked to a wchan.Three new sysctls are added in order to configure the thread:debug.deadlkres.slptime_thresholddebug.deadlkres.blktime_thresholddebug.deadlkres.sleepfreqrappresenting the thresholds for sleep and block time that will lead toa deadlock matching (when exceeded), while the sleepfreq rappresents thenumber of seconds between 2 consecutive thread runnings.In order to enable the deadlock resolver thread recompile your kernelwith the option DEADLKRES.Sponsored by:	Sandvine Incorporated

            List of files:
            /freebsd-14.2/share/man/man9/sleepqueue.9</description>
        <pubDate>Mon, 25 Jan 2010 12:05:51 +0000</pubDate>
        <dc:creator>Attilio Rao &lt;attilio@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>702748e9 - MFC r200447,201703,201709-201710:</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/share/man/man9/sleepqueue.9#702748e9</link>
        <description>MFC r200447,201703,201709-201710:In current code, threads performing an interruptible sleepwill leave the waiters flag on forcing the owner to do a wakeup evenwhen the waiter queue is empty.That operation may lead to a deadlock in the case of doing a fake wakeupon the &quot;preferred&quot; queue while the other queue has real waiters on it,because nobody is going to wakeup the 2nd queue waiters and they willsleep indefinitively.A similar bug, is present, for lockmgr in the case the waiters aresleeping with LK_SLEEPFAIL on.Add a sleepqueue interface which does report the actual number of waiterson a specified queue of a waitchannel and track if at least one sleepfailwaiter is present or not. In presence of this or empty &quot;preferred&quot; queue,wakeup both waiters queues.Discussed with:	kibTested by:	Pete French &lt;petefrench at ticketswitch dot com&gt;,		Justin Head &lt;justin at encarnate dot com&gt;

            List of files:
            /freebsd-14.2/share/man/man9/sleepqueue.9</description>
        <pubDate>Mon, 18 Jan 2010 14:43:44 +0000</pubDate>
        <dc:creator>Attilio Rao &lt;attilio@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>2709ebf1 - MFC r200450:</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/share/man/man9/sleepqueue.9#2709ebf1</link>
        <description>MFC r200450:Document PBDRY and SLEEPQ_STOP_ON_BDRY.

            List of files:
            /freebsd-14.2/share/man/man9/sleepqueue.9</description>
        <pubDate>Thu, 17 Dec 2009 18:43:34 +0000</pubDate>
        <dc:creator>Konstantin Belousov &lt;kib@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>f7829d0d - Introduce the new kernel thread called &quot;deadlock resolver&quot;.</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/share/man/man9/sleepqueue.9#f7829d0d</link>
        <description>Introduce the new kernel thread called &quot;deadlock resolver&quot;.While the name is pretentious, a good explanation of its targets isreported in this 17 months old presentation e-mail:http://lists.freebsd.org/pipermail/freebsd-arch/2008-August/008452.htmlIn order to implement it, the sq_type in sleepqueues is mandatory and notonly compiled along with INVARIANTS option. Additively, a new sleepqueuefunction, sleepq_type() is added, returning the type of the sleepqueuelinked to a wchan.Three new sysctls are added in order to configure the thread:debug.deadlkres.slptime_thresholddebug.deadlkres.blktime_thresholddebug.deadlkres.sleepfreqrappresenting the thresholds for sleep and block time that will lead toa deadlock matching (when exceeded), while the sleepfreq rappresents thenumber of seconds between 2 consecutive thread runnings.In order to enable the deadlock resolver thread recompile your kernelwith the option DEADLKRES.Reviewed by:	jeffTested by:	pho, Giovanni TrematerraSponsored by:	Nokia Incorporated, Sandvine IncorporatedMFC after:	2 weeks

            List of files:
            /freebsd-14.2/share/man/man9/sleepqueue.9</description>
        <pubDate>Sat, 09 Jan 2010 01:46:38 +0000</pubDate>
        <dc:creator>Attilio Rao &lt;attilio@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>ec897c88 - Document PBDRY and SLEEPQ_STOP_ON_BDRY.</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/share/man/man9/sleepqueue.9#ec897c88</link>
        <description>Document PBDRY and SLEEPQ_STOP_ON_BDRY.Requested and reviewed by:	attilioMFC after:	3 days

            List of files:
            /freebsd-14.2/share/man/man9/sleepqueue.9</description>
        <pubDate>Sat, 12 Dec 2009 22:08:37 +0000</pubDate>
        <dc:creator>Konstantin Belousov &lt;kib@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>2028867d - In current code, threads performing an interruptible sleep (on both</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/share/man/man9/sleepqueue.9#2028867d</link>
        <description>In current code, threads performing an interruptible sleep (on bothsxlock, via the sx_{s, x}lock_sig() interface, or plain lockmgr), willleave the waiters flag on forcing the owner to do a wakeup even when ifthe waiter queue is empty.That operation may lead to a deadlock in the case of doing a fake wakeupon the &quot;preferred&quot; (based on the wakeup algorithm) queue while the otherqueue has real waiters on it, because nobody is going to wakeup the 2ndqueue waiters and they will sleep indefinitively.A similar bug, is present, for lockmgr in the case the waiters aresleeping with LK_SLEEPFAIL on.  In this case, even if the waiters queueis not empty, the waiters won&apos;t progress after being awake but they willjust fail, still not taking care of the 2nd queue waiters (as instead thelock owned doing the wakeup would expect).In order to fix this bug in a cheap way (without adding too much lockingand complicating too much the semantic) add a sleepqueue interface whichdoes report the actual number of waiters on a specified queue of awaitchannel (sleepq_sleepcnt()) and use it in order to determine if theexclusive 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&apos;t solve the LK_SLEEPFAIL bug. In order tocope with it, add the tracking of how many exclusive LK_SLEEPFAIL waitersa lockmgr has and if all the waiters on the exclusive waiters queue areLK_SLEEPFAIL just wake both queues.The sleepq_sleepcnt() introduction and ABI breakage require__FreeBSD_version bumping.Reported by:	avg, kib, phoReviewed by:	kibTested by:	pho

            List of files:
            /freebsd-14.2/share/man/man9/sleepqueue.9</description>
        <pubDate>Sat, 12 Dec 2009 21:31:07 +0000</pubDate>
        <dc:creator>Attilio Rao &lt;attilio@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>2cdcea5e - Document the new return values for sleepq_abort(), sleepq_broadcast(), and</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/share/man/man9/sleepqueue.9#2cdcea5e</link>
        <description>Document the new return values for sleepq_abort(), sleepq_broadcast(), andsleepq_signal().Prodded by:	attilio

            List of files:
            /freebsd-14.2/share/man/man9/sleepqueue.9</description>
        <pubDate>Thu, 07 Aug 2008 20:47:01 +0000</pubDate>
        <dc:creator>John Baldwin &lt;jhb@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>9d77e05a - - Change the description of sleepq_add(), sleepq_broadcast() and</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/share/man/man9/sleepqueue.9#9d77e05a</link>
        <description>- Change the description of sleepq_add(), sleepq_broadcast() and  sleepq_signal() to reflect recent changesSubmitted by:	attilioApproved by:	re (bmah)

            List of files:
            /freebsd-14.2/share/man/man9/sleepqueue.9</description>
        <pubDate>Fri, 28 Sep 2007 11:13:40 +0000</pubDate>
        <dc:creator>Gabor Kovesdan &lt;gabor@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>e7573e7a - Allow threads to atomically release rw and sx locks while waiting for an</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/share/man/man9/sleepqueue.9#e7573e7a</link>
        <description>Allow threads to atomically release rw and sx locks while waiting for anevent.  Locking primitives that support this (mtx, rw, and sx) now eachinclude their own foo_sleep() routine.- Rename msleep() to _sleep() and change it&apos;s &apos;struct mtx&apos; object to a  &apos;struct lock_object&apos; 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 &apos;RETURN VALUES&apos; section in sleep.9 and add an &apos;ERRORS&apos;  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.

            List of files:
            /freebsd-14.2/share/man/man9/sleepqueue.9</description>
        <pubDate>Fri, 09 Mar 2007 22:41:01 +0000</pubDate>
        <dc:creator>John Baldwin &lt;jhb@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>32d2c58b - Document SLEEPQ_PAUSE.</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/share/man/man9/sleepqueue.9#32d2c58b</link>
        <description>Document SLEEPQ_PAUSE.

            List of files:
            /freebsd-14.2/share/man/man9/sleepqueue.9</description>
        <pubDate>Fri, 09 Mar 2007 18:06:36 +0000</pubDate>
        <dc:creator>John Baldwin &lt;jhb@FreeBSD.org&gt;</dc:creator>
    </item>
</channel>
</rss>
