From nobody Thu Oct 12 10:12:32 2023 X-Original-To: dev-commits-src-branches@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 4S5lnF25xvz4ngwS; Thu, 12 Oct 2023 10:12:33 +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 4S5lnF1Z4Yz3TZX; Thu, 12 Oct 2023 10:12:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697105553; 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=nnCSm8Sx30E9m19Pow+HESoC3zP7uy0FiTKKWb1CvzU=; b=fu7Hsv7DhuyjJbR9oAu7IqQ0xhDuCYpZYGyQayXm7Ejrx38ATKO5APrM9lhvm0K5OPEl/T +lo++jFEnUS8sWAExNaaSfWcKtrrajVSwAVDWKJItdqZjxA7TjoikYDi2kZya3t6/zXaKN 7Ms0m+higEXOLSD3bh+BCfXid+1Z+8yPJch9cUUMZOWy5rI/GgfxPq9ZdKoUTNkla34zGO gnyhB/woq9yy+GP4+AgVSXw5TyqobdHKooNmNvef6ZkEKI5QLdb34u89fcNzv/3meSbAsg CbQYkCPlqRyPDNUPvnweKDis2hWhDcPu62oiMWPm+eEkBIswPj4llBKLDJ/sAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697105553; a=rsa-sha256; cv=none; b=NXum8EzJAs/VEy+fl0eXdP/iYdZRv7cSnopOmX1I3a66yTfdq9wl03N68ztPwnMoRbRT+q SXJlPrjMy78cJ7RstHorpBYN2TrhD9802y7rau8SmliRF2/Y3nc8yLzbd36/VdaOQctfW3 AEaSWSGzcVsIiEaOHvETHFXuNVs042yaR6QeFG9LHEoOC7cGfSpDP/WVA1oSQ5B2SHmEAL w8OuU467DTNAjdTTgPgH4rCc2+sggjI2EGTy4uDb2RryjWlDJCHUUgUkIgplKhoghCpCa+ 5u1UXoqwNeOk6W0DqQ4CojjOKlUW4V5fHNePLMO9Z5ESaiV87/+/IGz/FMvsVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697105553; 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=nnCSm8Sx30E9m19Pow+HESoC3zP7uy0FiTKKWb1CvzU=; b=nQnHN/KHSmP96RhTWU7ArbmWgVwltk7TAQgPCmL66mc9DuVgWehsShg2NOUHztB8q5GLdg bMx343LJNFC1ftfpBa6oGkUM6XXt+Y7twvSzt2xIfEieUxcrQaidK6Urk2yL0B8Q7+Rsp7 9jy57/xTIHnvOoZ2nNM0mDCghUueNiG8CHVgBOmTqJFFZdbFsQbn16iCFeTMm/Dx37JLR4 xZAr6lkYM7qZOGWouHSJcIcdWugnJHhAkxHjoeny9/IV38q2BF3eERF6GAqwx+XhpDeIzN WeRTBcLXy/Nk1ThB1/unhoHbNanlHM7LwTIM4Jn2zct0OzasrjZMw0n91R+YDg== 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 4S5lnF0crTz10f8; Thu, 12 Oct 2023 10:12:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39CACWPj072542; Thu, 12 Oct 2023 10:12:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39CACWa4072539; Thu, 12 Oct 2023 10:12:32 GMT (envelope-from git) Date: Thu, 12 Oct 2023 10:12:32 GMT Message-Id: <202310121012.39CACWa4072539@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: fd18dc70ceda - stable/12 - mbuf: Add sysctl flag CTLFLAG_TUN to loader tunables List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: fd18dc70ceda596b1007f1ec81e86c03a3b334a8 Auto-Submitted: auto-generated The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=fd18dc70ceda596b1007f1ec81e86c03a3b334a8 commit fd18dc70ceda596b1007f1ec81e86c03a3b334a8 Author: Zhenlei Huang AuthorDate: 2023-10-09 10:30:22 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-12 10:09:39 +0000 mbuf: Add sysctl flag CTLFLAG_TUN to loader tunables The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. kern.ipc.nmbclusters 2. kern.ipc.nmbjumbop 3. kern.ipc.nmbjumbo9 4. kern.ipc.nmbjumbo16 5. kern.ipc.nmbufs No functional change intended. Reviewed by: kib, imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42113 (cherry picked from commit 6a88498e53b24d870e066c2a94910ad23dd355eb) (cherry picked from commit b1456fd6209474410c031e5e82455588e2b656c0) (cherry picked from commit 0007ba082c3353f0c545e5dcf328ce30d74c5ab7) --- sys/kern/kern_mbuf.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index d9a7f30d6557..0130f8f2a324 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -176,8 +176,9 @@ sysctl_nmbclusters(SYSCTL_HANDLER_ARGS) } return (error); } -SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbclusters, CTLTYPE_INT|CTLFLAG_RW, -&nmbclusters, 0, sysctl_nmbclusters, "IU", +SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbclusters, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH, + &nmbclusters, 0, sysctl_nmbclusters, "IU", "Maximum number of mbuf clusters allowed"); static int @@ -197,8 +198,9 @@ sysctl_nmbjumbop(SYSCTL_HANDLER_ARGS) } return (error); } -SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbjumbop, CTLTYPE_INT|CTLFLAG_RW, -&nmbjumbop, 0, sysctl_nmbjumbop, "IU", +SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbjumbop, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH, + &nmbjumbop, 0, sysctl_nmbjumbop, "IU", "Maximum number of mbuf page size jumbo clusters allowed"); static int @@ -218,8 +220,9 @@ sysctl_nmbjumbo9(SYSCTL_HANDLER_ARGS) } return (error); } -SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbjumbo9, CTLTYPE_INT|CTLFLAG_RW, -&nmbjumbo9, 0, sysctl_nmbjumbo9, "IU", +SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbjumbo9, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH, + &nmbjumbo9, 0, sysctl_nmbjumbo9, "IU", "Maximum number of mbuf 9k jumbo clusters allowed"); static int @@ -239,8 +242,9 @@ sysctl_nmbjumbo16(SYSCTL_HANDLER_ARGS) } return (error); } -SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbjumbo16, CTLTYPE_INT|CTLFLAG_RW, -&nmbjumbo16, 0, sysctl_nmbjumbo16, "IU", +SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbjumbo16, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH, + &nmbjumbo16, 0, sysctl_nmbjumbo16, "IU", "Maximum number of mbuf 16k jumbo clusters allowed"); static int @@ -260,8 +264,9 @@ sysctl_nmbufs(SYSCTL_HANDLER_ARGS) } return (error); } -SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbufs, CTLTYPE_INT|CTLFLAG_RW, -&nmbufs, 0, sysctl_nmbufs, "IU", +SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbufs, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH, + &nmbufs, 0, sysctl_nmbufs, "IU", "Maximum number of mbufs allowed"); /*