tmpfs - Fix periodic syncer cpu-bound stalls w/tmpfs on big-mem boxes
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 15 Jan 2019 22:17:26 +0000 (14:17 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 22 Jan 2019 21:30:20 +0000 (13:30 -0800)
commit0f077a5dabb9c33d3d481babaa396754c58545a5
tree56d9f97d82264134f32ab26598b30a8c45659ae0
parent4ef1e33f5329fb0c9d6df14aee0e933a54b07349
tmpfs - Fix periodic syncer cpu-bound stalls w/tmpfs on big-mem boxes

* A bug in tmpfs leaves dirty tmpfs vnodes (which is basically all
  of them) on the syncer list, causing the syncer to scan the entire
  list every few seconds.  When a large number of vnodes are involved,
  this can lead to noticable cpu-bound stalls on the cpu the syncer is
  running on.

* Generally speaking this should significantly improve applications
  which use tmpfs a lot, such as synth runs, but was probably not noticed
  on machines with less than 32GB of ram due to the lower kern.maxvnodes
  default.

* Solved by unconditionally removing the vnode from the syncer list
  in tmpfs_fsync(), but otherwise leaving the vnode marked VISDIRTY and
  usually also VOBJDIRTY.  Tmpfs's reclaim code properly handles the
  disconnect regardless of the syncer state of the vnode.

  Removing the vnode ensures that only one syncer pass is performed on
  it, instead of repeated passes every few seconds.
sys/vfs/tmpfs/tmpfs_vnops.c