Commit 03414c3
committed
NFS: Trigger the "ls -l" readdir heuristic sooner
jira LE-1907
Rebuild_History Non-Buildable kernel-rt-5.14.0-284.30.1.rt14.315.el9_2
commit-author Benjamin Coddington <bcodding@redhat.com>
commit 85aa8dd
Since commit 1a34c8c ("NFS: Support larger readdir buffers") has
updated dtsize, and with recent improvements to the READDIRPLUS helper
heuristic, the heuristic may not trigger until many dentries are emitted
to userspace. This will cause many thousands of GETATTR calls for "ls
-l" when the directory's pagecache has already been populated. This
manifests as poor performance for long directory listings after an
initially fast "ls -l".
Fix this by emitting only 17 entries for any first pass through the NFS
directory's ->iterate_shared(), which allows userpace to prime the
counters for the heuristic.
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
(cherry picked from commit 85aa8dd)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>1 parent 4129cb6 commit 03414c3
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1069 | 1069 | | |
1070 | 1070 | | |
1071 | 1071 | | |
| 1072 | + | |
| 1073 | + | |
1072 | 1074 | | |
1073 | 1075 | | |
1074 | 1076 | | |
| |||
1078 | 1080 | | |
1079 | 1081 | | |
1080 | 1082 | | |
| 1083 | + | |
1081 | 1084 | | |
1082 | 1085 | | |
1083 | 1086 | | |
| |||
1101 | 1104 | | |
1102 | 1105 | | |
1103 | 1106 | | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
1104 | 1111 | | |
1105 | 1112 | | |
1106 | 1113 | | |
| |||
1182 | 1189 | | |
1183 | 1190 | | |
1184 | 1191 | | |
1185 | | - | |
1186 | | - | |
1187 | 1192 | | |
1188 | 1193 | | |
1189 | 1194 | | |
| |||
0 commit comments