From nobody Fri Oct 30 16:33:15 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jGRVS5qvFz6x9Jg for ; Fri, 30 Oct 2026 16:33:20 +0000 (UTC) (envelope-from git@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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jGRVS43GSz4PFZ for ; Fri, 30 Oct 2026 16:33:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793378000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NL3DM7s1tpMs6PpbVEo+9lbqCW8/kL4gqEDQh6GU61A=; b=DPb7sNUyx8ovFi0sbHnUxT/yYjRQ7XliqME9zIgeOuwsAe7RPdber/CleF9GqFYmCjjXkt bDKAWE294AG2gLeIlSU6f/wbHyUjsksZ0p0n36CIAGAdehkiAZ1jkZ59y9UCR6atInGiNz KNZfBclyBRDhMm5Hi6GLHXbcaFnCt0MO8kucwBny8MtbRk+n2IuagX7pye1EaRnbdKJLk+ icCppwl9H68poS/78uD4W7/wt27gTf4h+BELoGbVJj6dTOASozEGNfQxiclOtqb6rSVR0K ecfIX3M07vbWV+WkhVXSxH0gascks0nAyoZxoh5PNlTjAwykUHo8UoPRPiRihg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793378000; b=YoJxfHKolH5neYMNIthWt7wd/CnHbnSgCHgVx0NFZOJEPYolntkniuyUe0xIRZiQROrVNE knSd69aTT3eX+sUcuQPwINtk+jh5kWnWwCaRzQBKDhvZ0Oo5k72yl40V0jBBKwS1MudRs9 0lxJFce+C7z4ckzcvWck3K/FIZ+eJ0RaYzj0tqgKOl+aZJ5mq4mI0OWqopPRzj/mpDGX2b ruPOAz0+i3nqU+RTCXpLWkFvBy6AhqpzytfQLG5z7SiqRFZctlns+qR4htoe1f1IG1IPwh dqjZNdywWhDLEZgosHbOrP7cNPWhxSVuqvldlrY8zScrhcrT6ukfgs9hkNZPTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793378000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NL3DM7s1tpMs6PpbVEo+9lbqCW8/kL4gqEDQh6GU61A=; b=QpB4X+a6P7Ihq75uYQyUk75vgO0nxqXQPHIQOlqZxWJZbw06nGTvp+AEF3DFWpR0fSYoUF mTEL0xaPEskH3EIWBYI1rLzfuktqGRYMzxnczwAqLcZlgCQTYjDYs1pGGyD3n+BlDZqjmY Px6msqhuwFuo+Q6TjR0unU9V/sdmEfJ5g2g0LD3iIAffJkA0emLuX/ipRnQVPMAeGmfwMW Cem2bJjFdJDQWHW+pmUroKmtqWcbuA3yalR0z+vu/zbUiKxQM0j3hd4K3VOP68GQhY/frU P+odi8D2EhUThckEqo5HOgg2w/PFse0KX6SrfNb1UA3zUxYmxludXt9NF1NA3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jGRVS3jk7zblH for ; Fri, 30 Oct 2026 16:33:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 391be by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 30 Oct 2026 16:33:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Federico Angelilli From: Benedict Reuschling Subject: git: 622bf596b718 - main - man: Add new smp_rendezvous.9 List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bcr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 622bf596b71826d2e10788c81be624cec4d641fb Auto-Submitted: auto-generated Date: Fri, 30 Oct 2026 16:33:15 +0000 Message-Id: <6ae4c6cb.391be.14c1c8@gitrepo.freebsd.org> The branch main has been updated by bcr: URL: https://cgit.FreeBSD.org/src/commit/?id=622bf596b71826d2e10788c81be624cec4d641fb commit 622bf596b71826d2e10788c81be624cec4d641fb Author: Federico Angelilli AuthorDate: 2026-10-30 16:28:30 +0000 Commit: Benedict Reuschling CommitDate: 2026-10-30 16:32:01 +0000 man: Add new smp_rendezvous.9 Event: Oslo Hackaton 2026 Differential Revision: https://reviews.freebsd.org/D61040 --- share/man/man9/Makefile | 1 + share/man/man9/smp_rendezvous.9 | 112 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 414ff7c998e0..fb46f9cee884 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -335,6 +335,7 @@ MAN= accept_filter.9 \ signal.9 \ sleep.9 \ sleepqueue.9 \ + smp_rendezvous.9 \ smr.9 \ socket.9 \ stack.9 \ diff --git a/share/man/man9/smp_rendezvous.9 b/share/man/man9/smp_rendezvous.9 new file mode 100644 index 000000000000..81335872fa42 --- /dev/null +++ b/share/man/man9/smp_rendezvous.9 @@ -0,0 +1,112 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2026 Federico Angelilli +.\" +.Dd October 28, 2026 +.Dt SMP_RENDEZVOUS 9 +.Os +.Sh NAME +.Nm smp_rendezvous , +.Nm smp_rendezvous_cpu , +.Nm smp_rendezvous_cpus , +.Nm smp_rendezvous_cpus_retry , +.Nm smp_rendezvous_cpus_done , +.Nm smp_no_rendezvous_barrier +.Nd temporarily halt multiprocessing to run designated routine +.Sh SYNOPSIS +.In sys/smp.h +.Ft void +.Fo smp_rendezvous +.Fa "void (* setup_func)(void *)" +.Fa "void (* action_func)(void *)" +.Fa "void (* teardown_func)(void *)" +.Fa "void *arg" +.Fc +.Ft void +.Fo smp_rendezvous_cpu +.Fa "u_int cpuid" +.Fa "void (*setup_func)(void *)" +.Fa "void (*action_func)(void *)" +.Fa "void (*teardown_func)(void *)" +.Fa "void *arg" +.Fc +.Ft void +.Fo smp_rendezvous_cpus +.Fa "cpuset_t map" +.Fa "void (*setup_func)(void *)" +.Fa "void (*action_func)(void *)" +.Fa "void (*teardown_func)(void *)" +.Fa "void *arg" +.Fc +.Ft void +.Fo smp_rendezvous_cpus_retry +.Fa "cpuset_t map" +.Fa "void (* setup_func)(void *)" +.Fa "void (* action_func)(void *)" +.Fa "void (* teardown_func)(void *)" +.Fa "void (* wait_func)(void *, int)" +.Fa "struct smp_rendezvous_cpus_retry_arg *arg" +.Fc +.Ft void +.Fo smp_rendezvous_cpus_done +.Fa "struct smp_rendezvous_cpus_retry_arg *arg" +.Fc +.Sh DESCRIPTION +These functions provide an interface for interrupting the normal SMP +flow on a set of CPUs to execute an +.Fa action +routine on all of them. +The +.Fa setup +and +.Fa teardown +functions are executed before and after the action, respectively. +Between the setup and action, all CPUs are synchronized with a barrier, unless +.Nm smp_rendezvous_no_barrier +is specified as the setup argument. +The same mechanism applies to the transition between action and teardown. +.Pp +The +.Fn smp_rendezvous_cpus +function starts a rendezvous with the CPUs specified in the given +.Fa map . +The +.Fa arg +parameter is directly passed to the callbacks. +.Pp +The +.Fn smp_rendezvous +and +.Fn smp_rendezvous_cpu +functions act the same, respectively targeting all the CPUs or the one matching +.Fa cpuid . +.Pp +The +.Fn smp_rendezvous_cpus_retry +function repeatedly starts a rendezvous until all of the CPUs in the given +.Fa map +acknowledged completion by calling +.Fn smp_rendezvous_cpus_done . +In this case, the +.Fa arg +parameter is used to keep track of the working set of CPUs. +.Bd -literal -offset indent +struct smp_rendezvous_cpus_retry_arg { + cpuset_t cpus; +}; +.Ed +.Pp +The +.Fn smp_rendezvous_no_barrier +function is just a sentinel and should not be called. +.Sh SEE ALSO +.Xr cpuset 9 +.Sh HISTORY +The +.Nm smp_rendezvous +function was first introduced in +.Fx 3.3 . +.Sh AUTHORS +This manual page was written by +.An Federico Angelilli Aq Mt fedang@FreeBSD.org .