Add some lines about lwkt_serialize_adaptive_enter().
authorSascha Wildner <swildner@dragonflybsd.org>
Wed, 7 May 2008 20:03:09 +0000 (20:03 +0000)
committerSascha Wildner <swildner@dragonflybsd.org>
Wed, 7 May 2008 20:03:09 +0000 (20:03 +0000)
Submitted-by: sephe
share/man/man9/Makefile
share/man/man9/serializer.9

index 4f5901a..ceed1ac 100644 (file)
@@ -1,5 +1,5 @@
 # $FreeBSD: src/share/man/man9/Makefile,v 1.60.2.26 2003/06/13 01:04:17 hmp Exp $
-# $DragonFly: src/share/man/man9/Makefile,v 1.75 2008/04/15 22:02:59 swildner Exp $
+# $DragonFly: src/share/man/man9/Makefile,v 1.76 2008/05/07 20:03:09 swildner Exp $
 
 MAN=   accept_filter.9 \
        accf_data.9 \
@@ -516,6 +516,7 @@ MLINKS+=sensor_attach.9 sensordev_install.9 \
        sensor_attach.9 sensor_task_register.9 \
        sensor_attach.9 sensor_task_unregister.9
 MLINKS+=serializer.9 ASSERT_SERIALIZED.9 \
+       serializer.9 lwkt_serialize_adaptive_enter.9 \
        serializer.9 lwkt_serialize_enter.9 \
        serializer.9 lwkt_serialize_exit.9 \
        serializer.9 lwkt_serialize_handler_call.9 \
index 4f65467..64fa7f8 100644 (file)
 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $DragonFly: src/share/man/man9/serializer.9,v 1.3 2008/03/05 17:20:23 swildner Exp $
+.\" $DragonFly: src/share/man/man9/serializer.9,v 1.4 2008/05/07 20:03:09 swildner Exp $
 .\"
-.Dd March 31, 2007
+.Dd May 7, 2008
 .Os
 .Dt SERIALIZER 9
 .Sh NAME
 .Nm lwkt_serialize_init ,
 .Nm lwkt_serialize_enter ,
+.Nm lwkt_serialize_adaptive_enter ,
 .Nm lwkt_serialize_try ,
 .Nm lwkt_serialize_exit ,
 .Nm lwkt_serialize_handler_enable ,
@@ -51,6 +52,8 @@
 .Fn lwkt_serialize_init "lwkt_serialize_t s"
 .Ft void
 .Fn lwkt_serialize_enter "lwkt_serialize_t s"
+.Ft void
+.Fn lwkt_serialize_adaptive_enter "lwkt_serialize_t s"
 .Ft int
 .Fn lwkt_serialize_try "lwkt_serialize_t s"
 .Ft void
@@ -104,6 +107,26 @@ respectively initialize, hold and release the serializer
 is a non-blocking version of
 .Fn lwkt_serialize_enter .
 .Pp
+.Fn lwkt_serialize_adaptive_enter
+is a special version of
+.Fn lwkt_serialize_enter
+which will try to spin a bit before the current thread is put to sleep
+if the serializer
+.Fa s
+is contended.
+By default,
+.Fn lwkt_serialize_adaptive_enter
+favors spinning over sleeping.
+This behavior can be changed by tuning the
+.Va debug.serialize_bolimit
+and
+.Va debug.serialize_boround
+.Xr sysctl 8
+variables.
+Note that
+.Fn lwkt_serialize_adaptive_enter
+is only available in SMP kernels.
+.Pp
 .Fn lwkt_serialize_handler_disable ,
 .Fn lwkt_serialize_handler_enable
 and