From nobody Thu Oct 12 04:09:56 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 4S5bks0xFsz4xB9W; Thu, 12 Oct 2023 04:09:57 +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 4S5bkr6ZYdz4TpY; Thu, 12 Oct 2023 04:09:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697083796; 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=Lx7YmMcwmm3H1+sSI1cOEWVvhEzIKXymduHq0kubEUM=; b=TJt1Bbs1UcK8pwmTVFmnTecZiIcEgo8xTqGJG81zEZHIeT5K82epU1uEeplxHjI666KvM6 jhes6myNiVQuevQrpnnsk7S4VWfW0NG4v3MlM9UNadK+cg8cjl8qZWzxuXVNVHC1Ap19M+ mMX1vCVCqNaOCZENEhJwk8ySS3m5XHJ0j/fv0/QPRltRflx5rV69Q1uXCHuZnGTkUBTk2e iNVKsh+qOtv+ZFDWH94aJiNxSOhIC9AiN5GDntBUKprrKa38pi2Ftu20Grf7+rba+nORny +McEuUXCtYbGCF5onYgcv5NLUV5MgRUnxWmEfp7WCnw/zxucyyR5gKQin8itbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697083796; a=rsa-sha256; cv=none; b=jqJC9KsRhXh1NrH+JyL2JfD2ojS7UkMsrQkANyIBP6PUn+a0tVmu5FOU14xj+E+Z7z8yNW pfYG1vIvSaf36cK7rzGtJQMTVuk1IGqDVxS83o4aTjM5z2Js/zBShU5hnmRXQHth5ez5WJ 6vaa3c+x1cCJXlJkmYkXqIsArnTGzfljHDhupp1gqSk2oFZ7Tg899eUEge/BIHDXTb9Bjw ECNsNfcww+r+IRCJi71nizVZvSUKVOjdR+jxFAyJeiChlP7zfWcrm5FjEFoX6augzVOpj+ A2Q0VCOioP9X/xyAki1dvrYReqIIDyOJJii8CPa76Vnei3ofVgcsCMFjQ06tuA== 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=1697083796; 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=Lx7YmMcwmm3H1+sSI1cOEWVvhEzIKXymduHq0kubEUM=; b=SHJLtMCkCQ2+k+lzAJSzBGCoZJbsbwfqxx9cysLc3FNxDmGHGhJo2boJC8v+Z2aitacnzV zPPflJ6Jsw6mfr1C/3kOD8bpNRItEnF1KGPRFWWRUt3N4Jso3mumWaV3jdxYHTjnO0mEPe lNY0mLBIS0MBjGJVnuunRQtuyPgQ7r/244zQ92JeEzhmdOX73vPbgbpiVxh5AWKd99Ux9W TPHEEcI+fkeYooe5z+EgK85LhLKVz0fPe0uWazwV/yNCUFrmg0JmramKyL6jwDQFXAxCnj 9sK2PEyQsGRfMqkvYYN/IxnYfO9+ZTp25p0+sIKYJlVVk3q6eR62EdtjGXpjQQ== 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 4S5bkr5h40zpjd; Thu, 12 Oct 2023 04:09:56 +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 39C49upK058701; Thu, 12 Oct 2023 04:09:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39C49uD9058698; Thu, 12 Oct 2023 04:09:56 GMT (envelope-from git) Date: Thu, 12 Oct 2023 04:09:56 GMT Message-Id: <202310120409.39C49uD9058698@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: d9aa72334782 - stable/14 - fd: 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/14 X-Git-Reftype: branch X-Git-Commit: d9aa723347825418c742164c3e9a77d1e4b6943d Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=d9aa723347825418c742164c3e9a77d1e4b6943d commit d9aa723347825418c742164c3e9a77d1e4b6943d Author: Zhenlei Huang AuthorDate: 2023-10-09 10:30:21 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-12 04:08:19 +0000 fd: 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.maxfiles 2. kern.maxfilesperproc No functional change intended. Reviewed by: kib, imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42113 (cherry picked from commit 2af5ce5b5efb0cf6514acdc4a8b4058221641c39) --- sys/kern/kern_descrip.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 35046c856d54..6ed824e229d6 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -5090,10 +5090,11 @@ DB_SHOW_COMMAND_FLAGS(files, db_show_files, DB_CMD_MEMSAFE) } #endif -SYSCTL_INT(_kern, KERN_MAXFILESPERPROC, maxfilesperproc, CTLFLAG_RW, +SYSCTL_INT(_kern, KERN_MAXFILESPERPROC, maxfilesperproc, + CTLFLAG_RWTUN | CTLFLAG_NOFETCH, &maxfilesperproc, 0, "Maximum files allowed open per process"); -SYSCTL_INT(_kern, KERN_MAXFILES, maxfiles, CTLFLAG_RW, +SYSCTL_INT(_kern, KERN_MAXFILES, maxfiles, CTLFLAG_RWTUN | CTLFLAG_NOFETCH, &maxfiles, 0, "Maximum number of files"); SYSCTL_INT(_kern, OID_AUTO, openfiles, CTLFLAG_RD,