Commit 85aa8dd
NFS: Trigger the "ls -l" readdir heuristic sooner
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>1 parent c528f70 commit 85aa8dd
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1074 | 1074 | | |
1075 | 1075 | | |
1076 | 1076 | | |
| 1077 | + | |
| 1078 | + | |
1077 | 1079 | | |
1078 | 1080 | | |
1079 | 1081 | | |
| |||
1083 | 1085 | | |
1084 | 1086 | | |
1085 | 1087 | | |
| 1088 | + | |
1086 | 1089 | | |
1087 | 1090 | | |
1088 | 1091 | | |
| |||
1106 | 1109 | | |
1107 | 1110 | | |
1108 | 1111 | | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
1109 | 1116 | | |
1110 | 1117 | | |
1111 | 1118 | | |
| |||
1187 | 1194 | | |
1188 | 1195 | | |
1189 | 1196 | | |
1190 | | - | |
1191 | | - | |
1192 | 1197 | | |
1193 | 1198 | | |
1194 | 1199 | | |
| |||
0 commit comments