Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/man/man9 Document percpu_foreach_xcall().



details:   https://anonhg.NetBSD.org/src/rev/f5285f095b90
branches:  trunk
changeset: 1007119:f5285f095b90
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Feb 07 13:02:35 2020 +0000

description:
Document percpu_foreach_xcall().

diffstat:

 share/man/man9/Makefile |   5 +++--
 share/man/man9/percpu.9 |  29 ++++++++++++++++++++++++-----
 2 files changed, 27 insertions(+), 7 deletions(-)

diffs (89 lines):

diff -r 96187e45488a -r f5285f095b90 share/man/man9/Makefile
--- a/share/man/man9/Makefile   Fri Feb 07 12:35:33 2020 +0000
+++ b/share/man/man9/Makefile   Fri Feb 07 13:02:35 2020 +0000
@@ -1,4 +1,4 @@
-#       $NetBSD: Makefile,v 1.446 2020/02/01 12:49:02 riastradh Exp $
+#       $NetBSD: Makefile,v 1.447 2020/02/07 13:02:35 thorpej Exp $
 
 #      Makefile for section 9 (kernel function and variable) manual pages.
 
@@ -667,7 +667,8 @@
        percpu.9 percpu_free.9 \
        percpu.9 percpu_getref.9 \
        percpu.9 percpu_putref.9 \
-       percpu.9 percpu_foreach.9
+       percpu.9 percpu_foreach.9 \
+       percpu.9 percpu_foreach_xcall.9
 MLINKS+=pfil.9 pfil_hook_get.9 \
        pfil.9 pfil_add_hook.9 \
        pfil.9 pfil_remove_hook.9 \
diff -r 96187e45488a -r f5285f095b90 share/man/man9/percpu.9
--- a/share/man/man9/percpu.9   Fri Feb 07 12:35:33 2020 +0000
+++ b/share/man/man9/percpu.9   Fri Feb 07 13:02:35 2020 +0000
@@ -1,4 +1,4 @@
-.\"     $NetBSD: percpu.9,v 1.13 2020/02/01 12:49:02 riastradh Exp $
+.\"     $NetBSD: percpu.9,v 1.14 2020/02/07 13:02:35 thorpej Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 29, 2020
+.Dd February 7, 2020
 .Dt PERCPU 9
 .Os
 .Sh NAME
@@ -37,7 +37,8 @@
 .Nm percpu_free ,
 .Nm percpu_getref ,
 .Nm percpu_putref ,
-.Nm percpu_foreach
+.Nm percpu_foreach ,
+.Nm percpu_foreach_xcall
 .Nd per-CPU storage allocator
 .Sh SYNOPSIS
 .In sys/percpu.h
@@ -54,6 +55,8 @@
 .Fn percpu_putref "percpu_t *pc"
 .Ft void
 .Fn percpu_foreach "percpu_t *pc" "percpu_callback_t cb" "void *arg"
+.Ft void
+.Fn percpu_foreach_xcall "percpu_t *pc" "u_int xcflags" "percpu_callback_t cb" "void *arg"
 .Sh DESCRIPTION
 The machine-independent
 .Nm
@@ -171,14 +174,30 @@
 The call to
 .Fa cb
 runs in the current thread; use
-.Xr xcall 9
-for cross-calls to run logic on other CPUs.
+.Fn percpu_foreach_xcall
+to to execute the call to
+.Fa cb
+on the remote CPUs.
 .Pp
 Must be used in thread context.
 .Fa cb
 .Em MUST NOT
 sleep except on adaptive locks, and should be fast.
 Do not rely on any particular order of iteration over the CPUs.
+.It Fn percpu_foreach_xcall "pc" "xcflags" "cb" "arg"
+Like
+.Fn percpu_foreach ,
+except the call to
+.Fa cb
+executes on the remote CPUs.
+The
+.Fa xcflags
+argument specifies how the cross calls are invoked; see
+.Xr xc_broadcast 9 .
+The same caveats and restrictions that apply to
+.Fn percpu_foreach
+also apply to
+.Fn percpu_foreach_xcall .
 .El
 .Sh CODE REFERENCES
 The



Home | Main Index | Thread Index | Old Index