From nobody Thu Oct 12 15:02:52 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 4S5tDF2BwJz4wV2f; Thu, 12 Oct 2023 15:02:53 +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 4S5tDD63GZz4ZPZ; Thu, 12 Oct 2023 15:02:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697122972; 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=Gw48cyzDTZWRDFYZPNFsMz5YBA9mxlPVbqoRwTd81v8=; b=VvEPIVHobdqLh28NfgC76s2Hdi6a1owphV0UcE21Yyy1MpCODgpXcrszpsxNqah63jverL 6gPIBINo6siMkeaPlXI7HXry1DhIbnnYJc3BJc5QTg+J/lokNhuPb8yuknNgLA4D4EzCCY gw+IEUEGubixDsInXgNbMe9TcHRXjfBdXTbzblzdpZBlLt4yqkTt4C1JYPjM1vjTe0t5GL nuBcwrZJNiOp4jiWEZjbOyxmg0o33uQs59kWTeE+f8O6Z0UTjggaDPVqHwC6yxFtem0Cbi Tcc+XeAuPDfJqapcjg54HW9TxWftjv/uztxe4q9plsohtAtJ4kzC/vYL/lXd/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697122972; a=rsa-sha256; cv=none; b=xuk14DxEfcS1yE9W9yeg2D4DAwjKMxGBilUxRldEG7wCVSXCSI6r4WrcXUyj+hUUeKd7dG yKgAx4R7+r+sMC5CsJtX2zji5st1RHbFgy5ydSH9VA4W+7xKDcl1c+JxA4z500idmo5jdU vJwMIhsKcV9hF57l3zpQcFY+bvmYz2al2x0QD+jZVIR2eCplOqU+mxCdwN7Mrk5IqRufV7 ozyLKsj1G8E4W40fYI7jRTP6jHqsIAJL5NZ3f8aw13Z2o3pr9o/+uunqMvLQBWqd1RWyKS xfTeA1HILMRhb/x8BTuCuh4ruaqisf/VkQJX/YKfZrFB7qylD1B5KAjpH8J/Qw== 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=1697122972; 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=Gw48cyzDTZWRDFYZPNFsMz5YBA9mxlPVbqoRwTd81v8=; b=Vc8m5aT9gIbSS6UemK2PkqoXGVsLJFhwm8R0a0YosZNMqqZ49m+cKxs7K1bGVey1ySIRKV wkg8u8um8UIrnrJJvQN1d7QkA1KzvHvmfOvCk2F8UvEBbajg7GUuCod3OLqOwjL0vSPrat mbib62E6U1/w0DXARkLmBA+YijUHsj+C3FRx5zSg2+poRNMTZtqgAVROBNcWseigbktIan O/aKihkYlJPzjcLLR/aP/jO8X1JhbrRhmi0bkwNhnFwNjrO4NdeG5Len9Ur13K/ywz5qXN tJjXTYv6imBcZf/Huvu8ssfipqy/Y3IB/jgaoBdAhhou3yOSmBB1prDrpc/ETg== 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 4S5tDD54RVz17vD; Thu, 12 Oct 2023 15:02:52 +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 39CF2qXI057154; Thu, 12 Oct 2023 15:02:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39CF2qXn057151; Thu, 12 Oct 2023 15:02:52 GMT (envelope-from git) Date: Thu, 12 Oct 2023 15:02:52 GMT Message-Id: <202310121502.39CF2qXn057151@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: 718c395417de - releng/14.0 - 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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 718c395417deb93d16fe81087670fa9a4d0cadea Auto-Submitted: auto-generated The branch releng/14.0 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=718c395417deb93d16fe81087670fa9a4d0cadea commit 718c395417deb93d16fe81087670fa9a4d0cadea Author: Zhenlei Huang AuthorDate: 2023-10-09 10:30:22 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-12 14:59:52 +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.mb_use_ext_pgs 2. kern.ipc.nmbclusters 3. kern.ipc.nmbjumbop 4. kern.ipc.nmbjumbo9 5. kern.ipc.nmbjumbo16 6. kern.ipc.nmbufs No functional change intended. Reviewed by: kib, imp Approved by: re (gjb) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42113 (cherry picked from commit 6a88498e53b24d870e066c2a94910ad23dd355eb) (cherry picked from commit b1456fd6209474410c031e5e82455588e2b656c0) --- sys/kern/kern_mbuf.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index 494379f53e7c..0897ac4cc2db 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -132,9 +132,9 @@ sysctl_mb_use_ext_pgs(SYSCTL_HANDLER_ARGS) } return (error); } -SYSCTL_PROC(_kern_ipc, OID_AUTO, mb_use_ext_pgs, CTLTYPE_INT | CTLFLAG_RW, - &mb_use_ext_pgs, 0, - sysctl_mb_use_ext_pgs, "IU", +SYSCTL_PROC(_kern_ipc, OID_AUTO, mb_use_ext_pgs, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH, + &mb_use_ext_pgs, 0, sysctl_mb_use_ext_pgs, "IU", "Use unmapped mbufs for sendfile(2) and TLS offload"); static quad_t maxmbufmem; /* overall real memory limit for all mbufs */ @@ -222,8 +222,8 @@ sysctl_nmbclusters(SYSCTL_HANDLER_ARGS) return (error); } SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbclusters, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, &nmbclusters, 0, - sysctl_nmbclusters, "IU", + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, + &nmbclusters, 0, sysctl_nmbclusters, "IU", "Maximum number of mbuf clusters allowed"); static int @@ -244,8 +244,8 @@ sysctl_nmbjumbop(SYSCTL_HANDLER_ARGS) return (error); } SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbjumbop, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, &nmbjumbop, 0, - sysctl_nmbjumbop, "IU", + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, + &nmbjumbop, 0, sysctl_nmbjumbop, "IU", "Maximum number of mbuf page size jumbo clusters allowed"); static int @@ -266,8 +266,8 @@ sysctl_nmbjumbo9(SYSCTL_HANDLER_ARGS) return (error); } SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbjumbo9, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, &nmbjumbo9, 0, - sysctl_nmbjumbo9, "IU", + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, + &nmbjumbo9, 0, sysctl_nmbjumbo9, "IU", "Maximum number of mbuf 9k jumbo clusters allowed"); static int @@ -288,8 +288,8 @@ sysctl_nmbjumbo16(SYSCTL_HANDLER_ARGS) return (error); } SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbjumbo16, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, &nmbjumbo16, 0, - sysctl_nmbjumbo16, "IU", + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, + &nmbjumbo16, 0, sysctl_nmbjumbo16, "IU", "Maximum number of mbuf 16k jumbo clusters allowed"); static int @@ -310,7 +310,7 @@ sysctl_nmbufs(SYSCTL_HANDLER_ARGS) return (error); } SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbufs, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, &nmbufs, 0, sysctl_nmbufs, "IU", "Maximum number of mbufs allowed");