From owner-svn-src-all@freebsd.org Sat Dec 5 11:18:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ECFF6476F8B; Sat, 5 Dec 2020 11:18:37 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cp6Wx6RCnz3LNn; Sat, 5 Dec 2020 11:18:37 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF6591D07E; Sat, 5 Dec 2020 11:18:37 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B5BIbGC091306; Sat, 5 Dec 2020 11:18:37 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B5BIbJm091305; Sat, 5 Dec 2020 11:18:37 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012051118.0B5BIbJm091305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 5 Dec 2020 11:18:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368368 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 368368 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2020 11:18:38 -0000 Author: gbe (doc committer) Date: Sat Dec 5 11:18:37 2020 New Revision: 368368 URL: https://svnweb.freebsd.org/changeset/base/368368 Log: 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 Modified: head/share/man/man9/epoch.9 Modified: head/share/man/man9/epoch.9 ============================================================================== --- head/share/man/man9/epoch.9 Sat Dec 5 11:17:54 2020 (r368367) +++ head/share/man/man9/epoch.9 Sat Dec 5 11:18:37 2020 (r368368) @@ -210,20 +210,6 @@ This function can sleep and is not optimized for perfo .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.