aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/mount.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/mount.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/mount.h')
-rw-r--r--sys/sys/mount.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index fdee238d1a3e..0bf8f2e28c74 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -219,10 +219,6 @@ struct mount {
#define mnt_endzero mnt_gjprovider
char *mnt_gjprovider; /* gjournal provider name */
struct mtx mnt_listmtx;
- struct vnodelst mnt_activevnodelist; /* (l) list of active vnodes */
- int mnt_activevnodelistsize;/* (l) # of active vnodes */
- struct vnodelst mnt_tmpfreevnodelist; /* (l) list of free vnodes */
- int mnt_tmpfreevnodelistsize;/* (l) # of free vnodes */
struct vnodelst mnt_lazyvnodelist; /* (l) list of lazy vnodes */
int mnt_lazyvnodelistsize; /* (l) # of lazy vnodes */
struct lock mnt_explock; /* vfs_export walkers lock */
@@ -256,20 +252,6 @@ void __mnt_vnode_markerfree_all(struct vnode **mvp, struct mount *mp);
} while (0)
/*
- * Definitions for MNT_VNODE_FOREACH_ACTIVE.
- */
-struct vnode *__mnt_vnode_next_active(struct vnode **mvp, struct mount *mp);
-struct vnode *__mnt_vnode_first_active(struct vnode **mvp, struct mount *mp);
-void __mnt_vnode_markerfree_active(struct vnode **mvp, struct mount *);
-
-#define MNT_VNODE_FOREACH_ACTIVE(vp, mp, mvp) \
- for (vp = __mnt_vnode_first_active(&(mvp), (mp)); \
- (vp) != NULL; vp = __mnt_vnode_next_active(&(mvp), (mp)))
-
-#define MNT_VNODE_FOREACH_ACTIVE_ABORT(mp, mvp) \
- __mnt_vnode_markerfree_active(&(mvp), (mp))
-
-/*
* Definitions for MNT_VNODE_FOREACH_LAZY.
*/
typedef int mnt_lazy_cb_t(struct vnode *, void *);