Chuck Lever 4a0e73e635 NFSD: Leave open files out of the filecache LRU
There have been reports of problems when running fstests generic/531
against Linux NFS servers with NFSv4. The NFS server that hosts the
test's SCRATCH_DEV suffers from CPU soft lock-ups during the test.
Analysis shows that:

fs/nfsd/filecache.c
 482                 ret = list_lru_walk(&nfsd_file_lru,
 483                                 nfsd_file_lru_cb,
 484                                 &head, LONG_MAX);

causes nfsd_file_gc() to walk the entire length of the filecache LRU
list every time it is called (which is quite frequently). The walk
holds a spinlock the entire time that prevents other nfsd threads
from accessing the filecache.

What's more, for NFSv4 workloads, none of the items that are visited
during this walk may be evicted, since they are all files that are
held OPEN by NFS clients.

Address this by ensuring that open files are not kept on the LRU
list.

Reported-by: Frank van der Linden <fllinden@amazon.com>
Reported-by: Wang Yugui <wangyugui@e16-tech.com>
Link: https://bugzilla.linux-nfs.org/show_bug.cgi?id=386
Suggested-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2022-07-29 20:10:08 -04:00
..
2022-06-17 06:03:30 +09:00
2022-05-09 16:21:44 -04:00
2022-05-09 16:21:45 -04:00
2022-07-16 13:48:55 -07:00
2022-05-09 16:21:45 -04:00
2022-05-02 11:23:49 -05:00
2022-06-01 11:54:29 -07:00
2022-06-03 10:34:34 -07:00
2022-05-27 15:49:30 -07:00
2022-05-24 19:55:07 -07:00
2022-05-09 16:21:45 -04:00
2022-05-24 19:55:07 -07:00
2022-06-03 16:57:16 -07:00
2022-05-09 23:12:53 -04:00
2022-05-09 16:21:46 -04:00
2022-05-23 20:24:12 -05:00
2022-05-24 19:55:07 -07:00
2022-05-24 19:55:07 -07:00
2022-05-24 19:55:07 -07:00
2022-06-14 12:18:47 +02:00
2022-03-28 17:29:53 -07:00
2022-05-27 15:49:30 -07:00
2022-05-09 18:20:49 -07:00
2022-06-04 18:52:00 -07:00
2022-04-01 19:35:56 -07:00
2022-06-04 19:07:15 -07:00
2022-04-19 10:19:02 -07:00
2022-05-22 21:03:01 +01:00
2022-04-17 19:49:59 -06:00