From nobody Thu Oct 05 12:44:51 2023 X-Original-To: dev-commits-src-all@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 4S1WVC6tscz4wZkl; Thu, 5 Oct 2023 12:44:51 +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 4S1WVC4gCYz4CWt; Thu, 5 Oct 2023 12:44:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696509891; 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=KwlB48N6Gf2oS0dneumjCoZZnGKYOPMNjL7VWlr+DBM=; b=wW3gMpyicC/JFhN2M628In+P2hp6zFNi1V3fr1nvUmwApcVwxj68ygMB9rIHVpGv3VgJmm jTeRIBjaiuKgYdLlF1zrOhuCoM+r9JBffZrkeaMdpKc2lcp3uHPeph55UJJy2aYUbhYjAI 9o/QBtHHN7R6IyP0OhSvo+BM6N6PWogYGegl5B6WqAHjnzkI0jhT1Z7ev5nzPyxCqsuYzV X33wG+8Y4zAE/+lcL8USJoDQkwnHdaTnSE4ysymdFZYjscWnDYD1nJX1SAhyIxaaApEnQS gNrdUBTgYHabFebIn5GfZk1ttdgaAw5roroN//3W9VwFKA9SQ0SVFOLv17PSPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696509891; a=rsa-sha256; cv=none; b=t0FRgPJZPj7LP48ZLZK5lppVd3OX+nkm4ubrlDhotVj3NFTfgr0YB7iAbub32PmLasnQcX ZAjLuCMbBLPthATDHnWB5dwc48IC+6F5Ni5LuTuYw2WVEh3RDzO5trMdH7z2e15q0blX5h HGuOXERmxhyB/kRmwpEzSBZYN9sqRRnMDliBYhvtPL+Ho8n7mIqYfMexT/BCRz/Y8/2jcP s+iNi5nfbeqOx1at8g2X8ERmfiZgsLEo3t/qo6dmE5W7MFJmRwzd/MEet4UhRoD92TDKYi q+ZuXYjaXQSHOJQJ0X/4YkePxsPTqJ2g2mn5jX9ypg75g3PnE8qLJzApVSRlxw== 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=1696509891; 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=KwlB48N6Gf2oS0dneumjCoZZnGKYOPMNjL7VWlr+DBM=; b=WEBiHLFd4v4R6AKitntZJF7KEzqjMOEbyNUG+3QOpyvxukg0uyFpAv/qewonoOk0lqsSal lw8NSnBOMISsuVR3tYmK5yMnS7n4HVI5nBfO5W9poA98z6XMuvz25XREti/W+yTo8aYqYo 1KPR0s+cu4aBNXeTc8zZGsy4pG28IzYeENWd3+6n2Vb5XOM6K6RS6UxiSTWOCXf0nUphdq UYtaB8yHDrCzxuVEIFFTEYlsYCtB9PWks7CBylcfNARRHBKs17J6PmQLPd0oY1zIFYp2Ia hAJjjxuZtf8YH4NA7qY1+zCG8iXEpCtVnrVfVO4MkXRS6Q2kDuTFgnFJ1BwCHg== 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 4S1WVC3mtsz1L5N; Thu, 5 Oct 2023 12:44:51 +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 395CipAn027509; Thu, 5 Oct 2023 12:44:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395CipkC027506; Thu, 5 Oct 2023 12:44:51 GMT (envelope-from git) Date: Thu, 5 Oct 2023 12:44:51 GMT Message-Id: <202310051244.395CipkC027506@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: 8b622172ba44 - main - vfs cache: add 2 more optimizaiton ideas List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 8b622172ba44f914092c1d44cecb2b101eb8e17b Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=8b622172ba44f914092c1d44cecb2b101eb8e17b commit 8b622172ba44f914092c1d44cecb2b101eb8e17b Author: Mateusz Guzik AuthorDate: 2023-10-05 12:38:32 +0000 Commit: Mateusz Guzik CommitDate: 2023-10-05 12:44:43 +0000 vfs cache: add 2 more optimizaiton ideas --- sys/kern/vfs_cache.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index cc2f405d5281..99e293d5a873 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -276,6 +276,20 @@ * It could become part of the API contract to *always* have a rootvnode set in * mnt_rootvnode. Such vnodes are annotated with VV_ROOT and vnlru would have * to be modified to always skip them. + * + * === inactive on v_usecount reaching 0 + * + * VOP_NEED_INACTIVE should not exist. Filesystems would indicate need for such + * processing with a bit in usecount. + * + * === v_holdcnt + * + * Hold count should probably get eliminated, but one can argue it is a useful + * feature. Even if so, handling of v_usecount could be decoupled from it -- + * vnlru et al would consider the vnode not-freeable if has either hold or + * usecount on it. + * + * This would eliminate 2 atomics. */ static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,