From nobody Mon Sep 26 18:13:23 2022 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 4MbrTv4yRsz4cPK8; Mon, 26 Sep 2022 18:13:23 +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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MbrTv4TF8z3Q78; Mon, 26 Sep 2022 18:13:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664216003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bLQE/SMH2tZ1cu6Guj1TEaQx71MnNhSUAj2Army7E3U=; b=b7V/x8+lu5oMNdYkV4YzkHQd65198pfdAxajhehEkVeqwb2PW6ZOTo5Ej3QtZrR2jp2S7y NuKxcYQoD5UO7ycn/DPdf2/7p+HK6rqOwoavqBnPjP7+PsEtt1Q1rzSB1KEw+x/AtHvtbT 9EKYTR5cgeKABoqlWYulDnvl8IX9OK6xe3t58Pr4uRbNSFtC2ChHRXW6adHUeVoXKdQRvu vYa2TSYezTkqkaFhE3eIKE6lWuySB7Ir6jogBCt2OBOiIs8oZ4MdBo0y8lC/ING6fpG0ua QbJUTzASuA4owVBwhPARKbqitveu6CVqGGprh1nA3sT0irzEmiU0Sr97ZF0Dew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MbrTv3SQ0zrTm; Mon, 26 Sep 2022 18:13:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 28QIDNEW049669; Mon, 26 Sep 2022 18:13:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28QIDNlE049668; Mon, 26 Sep 2022 18:13:23 GMT (envelope-from git) Date: Mon, 26 Sep 2022 18:13:23 GMT Message-Id: <202209261813.28QIDNlE049668@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 87767249233f - stable/13 - cpuset(9): Refer to CPU_SETSIZE not MAXCPU List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 87767249233f6ffef5d215c163cda4d306f813fd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664216003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bLQE/SMH2tZ1cu6Guj1TEaQx71MnNhSUAj2Army7E3U=; b=fU83d9Ag7ds9thjA4a5dyHNWB6W4g1u3PDFsEiBpSW6pn9PylWownK1/i2XdUpgbISh8XW tlpUD+8iUqfLyvm3LUxc0UXX/VEXtxvM1lJtm+wD7Pi19kSHbc8PQUyawRZshtnWSFBADJ l5w6yX3NxodSaVCbF2RBdGDxtssVgFOcF32Txm6tnmE4zh9m4laOy1bgtoal77miWWPVCo BlKnkuyeTltpnti+XK1BtluV8oNSEMFzstkzaqWXEVGNR4s/QOJwgVkxa6V/Zceg493Ecy XDae5M9ZvIVtu3D5brS2UwV9F5l8WEjyJ9uRtYakVUIzBRNLFvfLw5AE2u1f0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664216003; a=rsa-sha256; cv=none; b=EVu+Fs1K+Fzl0Pbnmro0P1+y+7FzNMpUzUFe7w0OwOh6itMF9NLh3J5bcBzRCpI/sZmaAm 2UDivBaNhef/Gxd20WVsyx0yV9YPMLhB8wpsbBXxXDWf5J0nKk2s2uh7/Gj1pnq6UQH5yX fkqIEUZiW12wIXivh93ro+mCVd8//LCropLf7f5s3LJSDhZfQqksIek55OW58Yvl4mdOcN Xqqc1sCRZRh0lxYlqKIQg43Uu5v2SHPDPKx2MyIXtQCCv6WDY2eRFLv1rkirbzk/8JNKe1 PvPxeXAPnK/oNojYMNxl5kiZFTp39SDn/AuXH1vJUTDTWeZDJhT8l/IKCe4UUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=87767249233f6ffef5d215c163cda4d306f813fd commit 87767249233f6ffef5d215c163cda4d306f813fd Author: Brooks Davis AuthorDate: 2022-09-23 20:20:52 +0000 Commit: Brooks Davis CommitDate: 2022-09-26 18:12:48 +0000 cpuset(9): Refer to CPU_SETSIZE not MAXCPU The maximum CPU number of a cpuset_t is determined by CPU_SETSIZE. In the kernel this is MAXCPU, but in userspace it is CPU_MAXSIZE unless CPU_SETSIZE is defined before including sys/_cpuset.h. CPU_MAXSIZE is 256 and in userspace MAXCPU is generally 1 because it being set to a larger MD value is gated on SMP being defined (not generally the case in userspace). Reported by: Nathaniel Wesley Filardo Reviewed by: cem, jhb Differential Revision: https://reviews.freebsd.org/D36679 (cherry picked from commit 8232a1eddadd6e70ce7bee085344b182517d44a7) --- share/man/man9/cpuset.9 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man9/cpuset.9 b/share/man/man9/cpuset.9 index 29dbc8fc733b..1320cd9f4350 100644 --- a/share/man/man9/cpuset.9 +++ b/share/man/man9/cpuset.9 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 12, 2019 +.Dd September 23, 2022 .Dt CPUSET 9 .Os .Sh NAME @@ -110,9 +110,9 @@ Each CPU is represented by a single bit. The maximum number of CPUs representable by .Vt cpuset_t is -.Va MAXCPU . +.Va CPU_SETSIZE . Individual CPUs in cpusets are referenced with indices zero through -.Fa MAXCPU - 1 . +.Fa CPU_SETSIZE - 1 . .Pp The .Fn CPUSET_T_INITIALIZER