path: root/sys/sys/vnode.h
diff options
authorMateusz Guzik <mjg@FreeBSD.org>2020-01-13 02:39:41 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2020-01-13 02:39:41 +0000
commit0c236d3d528d5b6de5d70309841d2cd2405465fd (patch)
tree47209bd940d8542ab5f7eeb7e5e88f696fdd2a94 /sys/sys/vnode.h
parentcc3593fbd953e2eeec72dbca05e77632817cba0b (diff)
vfs: per-cpu batched requeuing of free vnodes
Constant requeuing adds significant lock contention in certain workloads. Lessen the problem by batching it. Per-cpu areas are locked in order to synchronize against UMA freeing memory. vnode's v_mflag is converted to short to prevent the struct from growing. Sample result from an incremental make -s -j 104 bzImage on tmpfs: stock: 122.38s user 1780.45s system 6242% cpu 30.480 total patched: 144.84s user 985.90s system 4856% cpu 23.282 total Reviewed by: jeff Tested by: pho (in a larger patch, previous version) Differential Revision: https://reviews.freebsd.org/D22998
Notes: svn path=/head/; revision=356673
Diffstat (limited to 'sys/sys/vnode.h')
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 088e81429d7c..402e56482417 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -171,7 +171,8 @@ struct vnode {
u_int v_usecount; /* I ref count of users */
u_int v_iflag; /* i vnode flags (see below) */
u_int v_vflag; /* v vnode flags */
- u_int v_mflag; /* l mnt-specific vnode flags */
+ u_short v_mflag; /* l mnt-specific vnode flags */
+ short v_dbatchcpu; /* i LRU requeue deferral batch */
int v_writecount; /* I ref count of writers or
(negative) text users */
u_int v_hash;