Commit d636cbe
DLPX-84995 NFSD: Never call nfsd_file_gc() in foreground paths (#24)
The checks in nfsd_file_acquire() and nfsd_file_put() that directly
invoke filecache garbage collection are intended to keep cache
occupancy between a low- and high-watermark. The reason to limit the
capacity of the filecache is to keep filecache lookups reasonably
fast.
However, invoking garbage collection at those points has some
undesirable negative impacts. Files that are held open by NFSv4
clients often push the occupancy of the filecache over these
watermarks. At that point:
- Every call to nfsd_file_acquire() and nfsd_file_put() results in
an LRU walk. This has the same effect on lookup latency as long
chains in the hash table.
- Garbage collection will then run on every nfsd thread, causing a
lot of unnecessary lock contention.
- Limiting cache capacity pushes out files used only by NFSv3
clients, which are the type of files the filecache is supposed to
help.
To address those negative impacts, remove the direct calls to the
garbage collector.1 parent f09f848 commit d636cbe
1 file changed
+1
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | 31 | | |
34 | 32 | | |
35 | 33 | | |
| |||
65 | 63 | | |
66 | 64 | | |
67 | 65 | | |
68 | | - | |
69 | | - | |
70 | 66 | | |
71 | 67 | | |
72 | 68 | | |
| |||
306 | 302 | | |
307 | 303 | | |
308 | 304 | | |
309 | | - | |
310 | | - | |
311 | 305 | | |
312 | 306 | | |
313 | 307 | | |
| |||
1007 | 1001 | | |
1008 | 1002 | | |
1009 | 1003 | | |
1010 | | - | |
1011 | | - | |
| 1004 | + | |
1012 | 1005 | | |
1013 | 1006 | | |
1014 | 1007 | | |
| |||
0 commit comments