aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/vnode.h
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2020-01-13 02:37:25 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2020-01-13 02:37:25 +0000
commitcc3593fbd953e2eeec72dbca05e77632817cba0b (patch)
treeb5827bd68489e58764853a18f380df46585ceced /sys/sys/vnode.h
parent80663cadb825db5aa70756c7292f1f5315535120 (diff)
downloadsrc-cc3593fbd953e2eeec72dbca05e77632817cba0b.tar.gz
src-cc3593fbd953e2eeec72dbca05e77632817cba0b.zip
vfs: rework vnode list management
The current notion of an active vnode is eliminated. Vnodes transition between 0<->1 hold counts all the time and the associated traversal between different lists induces significant scalability problems in certain workloads. Introduce a global list containing all allocated vnodes. They get unlinked only when UMA reclaims memory and are only requeued when hold count reaches 0. Sample result from an incremental make -s -j 104 bzImage on tmpfs: stock: 118.55s user 3649.73s system 7479% cpu 50.382 total patched: 122.38s user 1780.45s system 6242% cpu 30.480 total Reviewed by: jeff Tested by: pho (in a larger patch, previous version) Differential Revision: https://reviews.freebsd.org/D22997
Notes
Notes: svn path=/head/; revision=356672
Diffstat (limited to 'sys/sys/vnode.h')
-rw-r--r--sys/sys/vnode.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index ec5ef7ef5520..088e81429d7c 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -147,7 +147,7 @@ struct vnode {
/*
* The machinery of being a vnode
*/
- TAILQ_ENTRY(vnode) v_actfreelist; /* l vnode active/free lists */
+ TAILQ_ENTRY(vnode) v_vnodelist; /* l vnode lists */
TAILQ_ENTRY(vnode) v_lazylist; /* l vnode lazy list */
struct bufobj v_bufobj; /* * Buffer cache object */
@@ -239,8 +239,6 @@ struct xvnode {
#define VI_TEXT_REF 0x0001 /* Text ref grabbed use ref */
#define VI_MOUNT 0x0020 /* Mount in progress */
-#define VI_FREE 0x0100 /* This vnode is on the freelist */
-#define VI_ACTIVE 0x0200 /* This vnode is on the active list */
#define VI_DOINGINACT 0x0800 /* VOP_INACTIVE is in progress */
#define VI_OWEINACT 0x1000 /* Need to call inactive */
#define VI_DEFINACT 0x2000 /* deferred inactive */
@@ -260,8 +258,7 @@ struct xvnode {
#define VV_FORCEINSMQ 0x1000 /* force the insmntque to succeed */
#define VV_READLINK 0x2000 /* fdescfs linux vnode */
-#define VMP_TMPMNTFREELIST 0x0001 /* Vnode is on mnt's tmp free list */
-#define VMP_LAZYLIST 0x0002 /* Vnode is on mnt's lazy list */
+#define VMP_LAZYLIST 0x0001 /* Vnode is on mnt's lazy list */
/*
* Vnode attributes. A field value of VNOVAL represents a field whose value