Commit 4808641
enforce arc_dnode_limit
Linux kernel shrinker in the context of null/root memcg does not scan
dentry and inode caches added by a task running in non-root memcg. For
ZFS this means that dnode cache routinely overflows, evicting valuable
meta/data and putting additional memory pressure on the system.
This patch restores zfs_prune_aliases as fallback when the kernel
shrinker does nothing, enabling zfs to actually free dnodes. Moreover,
it (indirectly) calls arc_evict when dnode_size > dnode_limit.
Reviewed-by: Rob Norris <robn@despairlabs.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Gionatan Danti <g.danti@assyoma.it>
Closes openzfs#17487
Closes openzfs#175421 parent 30fa92b commit 4808641
3 files changed
Lines changed: 78 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
954 | 954 | | |
955 | 955 | | |
956 | 956 | | |
957 | | - | |
| 957 | + | |
958 | 958 | | |
959 | 959 | | |
960 | 960 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1176 | 1176 | | |
1177 | 1177 | | |
1178 | 1178 | | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
1179 | 1236 | | |
1180 | 1237 | | |
1181 | 1238 | | |
| |||
1227 | 1284 | | |
1228 | 1285 | | |
1229 | 1286 | | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
1230 | 1295 | | |
1231 | 1296 | | |
1232 | 1297 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2631 | 2631 | | |
2632 | 2632 | | |
2633 | 2633 | | |
2634 | | - | |
| 2634 | + | |
2635 | 2635 | | |
2636 | 2636 | | |
2637 | 2637 | | |
| |||
2677 | 2677 | | |
2678 | 2678 | | |
2679 | 2679 | | |
2680 | | - | |
| 2680 | + | |
2681 | 2681 | | |
2682 | 2682 | | |
2683 | 2683 | | |
| |||
4490 | 4490 | | |
4491 | 4491 | | |
4492 | 4492 | | |
4493 | | - | |
| 4493 | + | |
4494 | 4494 | | |
4495 | 4495 | | |
4496 | 4496 | | |
| |||
5082 | 5082 | | |
5083 | 5083 | | |
5084 | 5084 | | |
5085 | | - | |
| 5085 | + | |
5086 | 5086 | | |
| 5087 | + | |
| 5088 | + | |
5087 | 5089 | | |
5088 | 5090 | | |
5089 | | - | |
| 5091 | + | |
5090 | 5092 | | |
5091 | 5093 | | |
5092 | 5094 | | |
| |||
5097 | 5099 | | |
5098 | 5100 | | |
5099 | 5101 | | |
5100 | | - | |
| 5102 | + | |
5101 | 5103 | | |
5102 | 5104 | | |
5103 | 5105 | | |
| |||
7324 | 7326 | | |
7325 | 7327 | | |
7326 | 7328 | | |
7327 | | - | |
| 7329 | + | |
7328 | 7330 | | |
7329 | 7331 | | |
7330 | 7332 | | |
| |||
7366 | 7368 | | |
7367 | 7369 | | |
7368 | 7370 | | |
7369 | | - | |
| 7371 | + | |
7370 | 7372 | | |
7371 | 7373 | | |
7372 | 7374 | | |
| |||
7736 | 7738 | | |
7737 | 7739 | | |
7738 | 7740 | | |
7739 | | - | |
| 7741 | + | |
7740 | 7742 | | |
7741 | 7743 | | |
7742 | 7744 | | |
| |||
7895 | 7897 | | |
7896 | 7898 | | |
7897 | 7899 | | |
7898 | | - | |
| 7900 | + | |
7899 | 7901 | | |
7900 | 7902 | | |
7901 | 7903 | | |
| |||
0 commit comments