Module Name:    src
Committed By:   riastradh
Date:           Sat Aug 20 14:17:36 UTC 2022

Modified Files:
        src/share/man/man9: mutex.9

Log Message:
mutex(9): Note counterintuitive IPL change releasing spin locks.

No functional change -- documentation only.

Details:

https://mail-index.netbsd.org/tech-kern/2010/11/12/msg009203.html


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/share/man/man9/mutex.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/mutex.9
diff -u src/share/man/man9/mutex.9:1.31 src/share/man/man9/mutex.9:1.32
--- src/share/man/man9/mutex.9:1.31	Sat Dec  9 16:00:19 2017
+++ src/share/man/man9/mutex.9	Sat Aug 20 14:17:36 2022
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mutex.9,v 1.31 2017/12/09 16:00:19 wiz Exp $
+.\"	$NetBSD: mutex.9,v 1.32 2022/08/20 14:17:36 riastradh Exp $
 .\"
 .\" Copyright (c) 2007, 2009 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -141,6 +141,19 @@ try to acquire adaptive mutexes or other
 .Pp
 A processor will always busy-wait when attempting to acquire
 a spin mutex that is already held.
+.Pp
+.Sy Note :
+Releasing a spin mutex may not lower the IPL to what it was when
+entered.
+If other spin mutexes are held, the IPL will not be lowered until the
+last one is released.
+.Pp
+This is usually not a problem because spin mutexes should held only for
+very short durations anyway, so blocking higher-priority interrupts a
+little longer doesn't hurt much.
+But it interferes with writing assertions that the IPL is
+.Em no higher than
+a specified level.
 .El
 .Pp
 See

Reply via email to