From ab19123cd9ba6034c15a5bedacbde2b50432a1f3 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Wed, 17 Feb 2010 00:16:57 -0800 Subject: [PATCH] kernel - SWAP CACHE part 21/many - more manual page adjustments * Explain data caching issues with NFS --- share/man/man8/swapcache.8 | 11 +++++++++++ usr.bin/chflags/chflags.1 | 5 ++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/share/man/man8/swapcache.8 b/share/man/man8/swapcache.8 index 1714dbef73..4002bea26b 100644 --- a/share/man/man8/swapcache.8 +++ b/share/man/man8/swapcache.8 @@ -156,6 +156,17 @@ A typical setup is something like this: .Dl chflags cache /etc /sbin /bin /usr /home .Dl chflags noscache /usr/obj .Pp +Alternatively if you have NFS mounts where chflags does not work you +can enable caching in some parent directory, then selectively disable +it. +.Pp +.Dl chflags cache / +.Dl chflags noscache /usr/obj /tmp /var/tmp +.Pp +If that doesn't work you can turn off +.Cd vm.swapcache.use_chflags +entirely and not bother with any chflagging. +.Pp .It Cd vm.swapcache.maxfilesize This may be used to reduce cache thrashing when a focus on a small potentially fragmented filespace is desired, leaving the diff --git a/usr.bin/chflags/chflags.1 b/usr.bin/chflags/chflags.1 index bad595851b..f7fc8c8dbc 100644 --- a/usr.bin/chflags/chflags.1 +++ b/usr.bin/chflags/chflags.1 @@ -235,7 +235,10 @@ If use_chflags is turned on along with data_enable then only subtrees marked cacheable will be swapcached. .Pp You would typically want to enable the cache on /usr, /home, and /bin -and disable it for /usr/obj. +and disable it for /usr/obj. Alternatively if you want to cache +NFS mounts (where chflags doesn't work), you can set the flag on +some parent directory, possibly even the root ( "/" ) itself, +and then selectively disable it in places where you don't want it. .Pp This only applies to data caching. Meta-data caching is universal when enabled. -- 2.41.0