From nobody Fri Sep 23 20:20:59 2022 X-Original-To: dev-commits-src-main@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 4MZ3SX1QWgz4cqtt; Fri, 23 Sep 2022 20:21:00 +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 4MZ3SX0lsyz3VGJ; Fri, 23 Sep 2022 20:21:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663964460; 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=XCqOLVNbWq+wHd4MWZl+9GTQsu/RJu24gRCDILw5m5M=; b=WuBMvxyU7hlZJxDWu2mxb0M4Dx9AY81H/hedYoFNfBnDoiMrQA7mQEZEhnzBb1d7Yqpa+C C6H6blfzJXsqFe/HL3yeO41Jpo3K3ZZW9kaMoSQWPPFq56bjYPV13W8cyvox2LyrNjyXtS PwOOFETdVke5gh+O5h9Li/ft4Z1EY3V0ABOLBNNFhJlc2d5lXIsedzrSPzEIbJk/ymdw/i OOaAHejEntBKJC6cim6P55NuZDTIAIGhL8TgHVw1DTOobUDlDuvfuaEX2eZLF8XMz0PWqB ryqUa0JyKPtOG1yqrQ+SM0wFy9OM4BuIx7b707yQaBtk9lwBI14TNBKBqOkGHA== 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 4MZ3SW6pd6zrPH; Fri, 23 Sep 2022 20:20:59 +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 28NKKxDl043059; Fri, 23 Sep 2022 20:20:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28NKKxqh043058; Fri, 23 Sep 2022 20:20:59 GMT (envelope-from git) Date: Fri, 23 Sep 2022 20:20:59 GMT Message-Id: <202209232020.28NKKxqh043058@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 8232a1eddadd - main - cpuset(9): Refer to CPU_SETSIZE not MAXCPU List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 8232a1eddadd6e70ce7bee085344b182517d44a7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663964460; 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=XCqOLVNbWq+wHd4MWZl+9GTQsu/RJu24gRCDILw5m5M=; b=Xr9r5Ipbg5a1vMEQhTwdPULxBd0DMeFFhf9ocHytJDaYORVSeBe7XrLYXn16kwI/w/VivO 7wKIiKSsNiTpmnoEXkKQsEWRaFlGHUDs4mvu4RjTect081u9xdU/mziL3LT64e45NXMjpJ CTZDdX9F8DB1l+RtqqzSnvXoi88CVGwnoQeFB+E1kxyCBOvFHRyBkiLTgLWSeVTfW6zD4K yDh4FQdrqo1oHLuvr14dnG7OW15ehilqdPw+kKHB1GUgoJrHUuAHdKrDoIhCiUvacl7mJV YXqRuNyZ2lcihjIKSa1l3WTDZT+e4h0DJFBf4j9eV1qhBcB23pk1TxiRjfTy5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663964460; a=rsa-sha256; cv=none; b=n0zjBZV+AgUQaY3mQGQ8i58NtPnbfuAY+1vpsLQp2ykWySk2nFK1Ealj3pnMGDE0eWKulI yQuVlCA4/4wz+4NYRQosQqcKtKf/QEW6/aTRBMMKqqafGVz6cXQ/+QD7R4qnwOmxD4K2bQ NG2joS+fP2ywdRroujZ3zSciUCZVHd2z1Ns7YummizNg9sjaCHhE/LlzfsnWpeinEIqbZM xgu2xXqZAXCF1eo55QUd+dbPQ0bWPjRuydgnh02qOnhxnpamnSrrbU7cL0F2HWYB8g0YFp Rg6w/XQCcwRE3XpljzfyskHe0zoAUyKgaSnDmanCt2+Hd0zBXYl2OyxAW8IQYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=8232a1eddadd6e70ce7bee085344b182517d44a7 commit 8232a1eddadd6e70ce7bee085344b182517d44a7 Author: Brooks Davis AuthorDate: 2022-09-23 20:20:52 +0000 Commit: Brooks Davis CommitDate: 2022-09-23 20:20:52 +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 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D36679 --- 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