git: tmpfs - Flush and recycle pages quickly during heavy paging activity
Matthew Dillon
dillon at crater.dragonflybsd.org
Wed Feb 12 17:14:33 PST 2020
commit cfd59c5a2b3edde0431e7578d5c63f4600f8a262
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Wed Feb 12 12:47:07 2020 -0800
tmpfs - Flush and recycle pages quickly during heavy paging activity
* When the pagedaemon is operating any write()s made via tmpfs will
be forced to operate through the buffer cache via cluster_write()
or bdwrite() instead of using buwrite().
This will cause the pages to be pipelined to backing store (swap)
under these conditions, making them clean immediately to avoid
having tmpfs cause further paging pressure on the system when it
is already under paging pressure.
* In addition, the B_TTC flag is set on these buffers to attempt to
recycle the pages directly into PQ_CACHE ASAP after they are flushed.
* Implement cluster_write() operation by default to try to improve
block sizes for physical I/O.
* TMPFS currently must move pages between two VM objects when
reclaiming a vnode, and back again upon re-use. The current
VM mechanism for renaming VM pages dirties them and this can
potentially cause the paging system to thrash on the same page
under heavy vnode recycling loads.
Instead of allowing this to happen, TMPFS now frees any clean
page that have backing store assigned when moving from the backing
object, and any clean pages that were instantiated from backing
store when moving to the backing object.
Summary of changes:
sys/vfs/tmpfs/tmpfs_vnops.c | 111 +++++++++++++++++++++++++++++++++++++-------
1 file changed, 93 insertions(+), 18 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/cfd59c5a2b3edde0431e7578d5c63f4600f8a262
--
DragonFly BSD source repository
More information about the Commits
mailing list