aboutsummaryrefslogtreecommitdiff
path: root/sys/sys
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2021-06-25 17:52:58 +0000
committerAlexander Motin <mav@FreeBSD.org>2021-06-25 18:12:21 +0000
commit6df35af4d85c6311d8e762521580e7176b69394e (patch)
tree15c30fb22399a50734ecb62059dfa5fde12f596c /sys/sys
parent520a2401a65f94a2a6766d3a253baa2a1af0e54b (diff)
downloadsrc-6df35af4d85c6311d8e762521580e7176b69394e.tar.gz
src-6df35af4d85c6311d8e762521580e7176b69394e.zip
Allow sleepq_signal() to drop the lock.
Introduce SLEEPQ_DROP sleepq_signal() flag, allowing one to drop the sleep queue chain lock before returning. Reduced lock scope allows significantly reduce lock contention inside taskqueue_enqueue() for ZFS worker threads doing ~350K disk reads/s on 40-thread system. MFC after: 2 weeks Sponsored by: iXsystems, Inc.
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/sleepqueue.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/sleepqueue.h b/sys/sys/sleepqueue.h
index 18c7568777b6..6715894ed1f3 100644
--- a/sys/sys/sleepqueue.h
+++ b/sys/sys/sleepqueue.h
@@ -85,6 +85,7 @@ struct thread;
#define SLEEPQ_LK 0x04 /* Used by a lockmgr. */
#define SLEEPQ_INTERRUPTIBLE 0x100 /* Sleep is interruptible. */
#define SLEEPQ_UNFAIR 0x200 /* Unfair wakeup order. */
+#define SLEEPQ_DROP 0x400 /* Return without lock held. */
void init_sleepqueues(void);
int sleepq_abort(struct thread *td, int intrval);