On Wed, Aug 2, 2023 at 3:35 AM Ole Salscheider <o...@salscheider.org> wrote: > > Hello, > > I noticed some strange behaviour of fscache with kernel 6.4.x in > combination with NFS (v4.2) and the pagecache. > > I have multiple clients mounting an NFS v4.2 file system from a server > and caching the data locally using fscache. After booting the clients, > most data is served from fscache and only a few requests hit the NFS > server. But after some minutes of operation (which typically includes a > lot of cyclic data reading for us), fewer and fewer files are served > from fscache and most are served by the NFS server. > It seems that this has something to do with the files being also in the > pagecache. If I periodcally drop the pagecache with "echo 3 > > /proc/sys/vm/drop_caches", then most of the files are served from > fscache again. > > Is this a known problem? If not, do you have any suggestion how I can > try to find the root cause? >
Yes this is most likely a known problem with a fix now in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm If it's the same problem, take these 3 patches and that should fix it: 6fbefbe174ca mm: call folio_mapping() inside folio_needs_release() 04cb8ddab902 mm, netfs, fscache: stop read optimisation when folio removed from pagecache 854fc8a567ab mm: merge folio_has_private()/filemap_release_folio() call pairs The main patch that fixes it is "04cb8ddab902 mm, netfs, fscache: Stop read optimisation when folio removed from pagecache" but there's a prerequisite patch and a fixup patch. > Thank you in advance! > > Best regards, > > Ole > > -- > Linux-cachefs mailing list > Linux-cachefs@redhat.com > https://listman.redhat.com/mailman/listinfo/linux-cachefs > -- Linux-cachefs mailing list Linux-cachefs@redhat.com https://listman.redhat.com/mailman/listinfo/linux-cachefs