From nobody Wed Oct 11 22:50:24 2023 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 4S5Sf92jN7z4wprd; Wed, 11 Oct 2023 22:50:25 +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 4S5Sf90Ypgz3XQR; Wed, 11 Oct 2023 22:50:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697064625; 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=G9SwekQ6X4ZmztdG46wCUlYrbybf4NS0HGpSBcfH9JI=; b=sFtUJ/bIVXyD2XLQ5wjZB5lIL+DbZUfRmDD6PPKoxdG1CKkUmOelrDBbG4h+WnNkrqiWX1 Qa5f/tniKxKyoWzGD7M17xtY+0sN7q7iKCG2V+W0IUdNs6Hjh4O5Dp2iWBGiqkoWMDC+6h iWRBcn83rMecCAdruJbC8vMW4LxSV9EVeLxfcPZ5rgj5HLY0uATzz54Rc0s/xCyluEat2g NKUMfNyjk215Ng2hBuaAkaluld365L/gV5D7jB9jV4Z1W38hhzHh5aBDquUVvA4v9QLy0j 0dQRdp11ZLEpWI4L0ajcy9xxPhpi/D/UUTMb6PTP8j6BgqYLIQKwptC3MWYnNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697064625; a=rsa-sha256; cv=none; b=nIZb74uGEk1b9iHJ9t1H4ricxMwKpSmqIb4pCsOnpdLR8DSYF19j8au5K8aurG7B2YZjIN 9ZR+MPKYUVtIo1WLxXtXopuuhgPW4AT2K8bmcHIMlXZbx7YE+VQGumigVrPFq6I0aRtPMg R0oRRzAJsvMDdyF+t8FUCvw4tsoVFJAEqjvS1vgfyr2hqnHvYbzYBDk9tMfT2vEW8yLvqA e0VMtW6UqWLi6OHcI+Ft8Uy390+P2qeRtP/hrPSm2Pq+ZZQwhWOy3ftDp+DA5gYTT12q0P QZ1fmm2J0TyQYxQqcwnNh633D7m0p0VBM9o/ytv+soUqanHXAO7Strc6i8cN3w== 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=1697064625; 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=G9SwekQ6X4ZmztdG46wCUlYrbybf4NS0HGpSBcfH9JI=; b=cdQ4WaSn/xeC+qkAgfgLVuTPFGsqn9aBE6brEaJgWhtL5SH9jGvRRELpclEwezFHzWxKR3 ixfAXVcvsU2CB/z4XkHIcHpEw4nY9+tld1ibMeyoMckCRQhnlTXe1gfbwMINuKXvg3u89i rgr3PaWx2dbc5s09WiJ9AB9dW2CrlDKfa4j+e2EX9tftJKf/8Lr5TKZ6KLtBTnPcQISJ2W ZmjZ0oBcaAJRfrD+E2SX8FvYWqjMZFuHbHELyvmedmPuk15nA86DIulKkr6hTdwDMtwFsE X4MuobutdmvMxMpDHnx/xjI/s4tssq6ms5STb88kmYG4hGjeCLLJlDPLAB/zQg== 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 4S5Sf86mCFzfyG; Wed, 11 Oct 2023 22:50:24 +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 39BMoOcU034364; Wed, 11 Oct 2023 22:50:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39BMoOVH034361; Wed, 11 Oct 2023 22:50:24 GMT (envelope-from git) Date: Wed, 11 Oct 2023 22:50:24 GMT Message-Id: <202310112250.39BMoOVH034361@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: bb679b0c4909 - main - vfs: count calls to uma_reclaim in vnlru 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bb679b0c49094757f2aef3d8fe46c41dc8192fea Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=bb679b0c49094757f2aef3d8fe46c41dc8192fea commit bb679b0c49094757f2aef3d8fe46c41dc8192fea Author: Mateusz Guzik AuthorDate: 2023-10-11 22:48:03 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-11 22:49:34 +0000 vfs: count calls to uma_reclaim in vnlru --- sys/kern/vfs_subr.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index d21ccb4251cd..01585ac9eefd 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1711,6 +1711,10 @@ vnlru_proc_light(void) return (true); } +static u_long uma_reclaim_calls; +SYSCTL_ULONG(_vfs_vnode_vnlru, OID_AUTO, uma_reclaim_calls, CTLFLAG_RD | CTLFLAG_STATS, + &uma_reclaim_calls, 0, "Number of calls to uma_reclaim"); + static void vnlru_proc(void) { @@ -1801,8 +1805,10 @@ vnlru_proc(void) * this happens. */ if (onumvnodes + VNLRU_COUNT_SLOP + 1000 > desiredvnodes && - numvnodes <= desiredvnodes) + numvnodes <= desiredvnodes) { + uma_reclaim_calls++; uma_reclaim(UMA_RECLAIM_DRAIN); + } if (done == 0) { if (force == 0 || force == 1) { force = 2;