From 2f3e7fb2cc8ddbc20711e82809430bf7c5eb88b3 Mon Sep 17 00:00:00 2001 From: Gordon Bergling Date: Sat, 5 Dec 2020 11:18:37 +0000 Subject: epoch(9): Fix a few mandoc related issues - sections out of conventional order: Sh EXAMPLES - sections out of conventional order: Sh SEE ALSO - skipping end of block that is not open: El --- share/man/man9/epoch.9 | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) (limited to 'share/man') diff --git a/share/man/man9/epoch.9 b/share/man/man9/epoch.9 index 70ab8d799ed5..e81b715f872a 100644 --- a/share/man/man9/epoch.9 +++ b/share/man/man9/epoch.9 @@ -210,20 +210,6 @@ This function can sleep and is not optimized for performance. .Sh RETURN VALUES .Fn in_epoch curepoch will return 1 if curthread is in curepoch, 0 otherwise. -.Sh CAVEATS -One must be cautious when using -.Fn epoch_wait_preempt . -Threads are pinned during epoch sections, so if a thread in a section is then -preempted by a higher priority compute bound thread on that CPU, it can be -prevented from leaving the section indefinitely. -.Pp -Epochs are not a straight replacement for read locks. -Callers must use safe list and tailq traversal routines in an epoch (see ck_queue). -When modifying a list referenced from an epoch section safe removal -routines must be used and the caller can no longer modify a list entry -in place. -An item to be modified must be handled with copy on write -and frees must be deferred until after a grace period has elapsed. .Sh EXAMPLES Async free example: Thread 1: @@ -280,12 +266,6 @@ free would have to follow a call to The .Nm kernel programming interface is under development and is subject to change. -.El -.Sh HISTORY -The -.Nm -framework first appeared in -.Fx 11.0 . .Sh SEE ALSO .Xr locking 9 , .Xr mtx_pool 9 , @@ -295,3 +275,22 @@ framework first appeared in .Xr sleep 9 , .Xr sx 9 , .Xr timeout 9 +.Sh HISTORY +The +.Nm +framework first appeared in +.Fx 11.0 . +.Sh CAVEATS +One must be cautious when using +.Fn epoch_wait_preempt . +Threads are pinned during epoch sections, so if a thread in a section is then +preempted by a higher priority compute bound thread on that CPU, it can be +prevented from leaving the section indefinitely. +.Pp +Epochs are not a straight replacement for read locks. +Callers must use safe list and tailq traversal routines in an epoch (see ck_queue). +When modifying a list referenced from an epoch section safe removal +routines must be used and the caller can no longer modify a list entry +in place. +An item to be modified must be handled with copy on write +and frees must be deferred until after a grace period has elapsed. -- cgit v1.2.3