]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vfs: per-cpu batched requeuing of free vnodes
authorMateusz Guzik <mjg@FreeBSD.org>
Mon, 13 Jan 2020 02:39:41 +0000 (02:39 +0000)
committerMateusz Guzik <mjg@FreeBSD.org>
Mon, 13 Jan 2020 02:39:41 +0000 (02:39 +0000)
commit0c236d3d528d5b6de5d70309841d2cd2405465fd
tree47209bd940d8542ab5f7eeb7e5e88f696fdd2a94
parentcc3593fbd953e2eeec72dbca05e77632817cba0b
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
sys/kern/vfs_subr.c
sys/sys/vnode.h