diff options
author | shodanshok <[email protected]> | 2022-10-28 19:21:54 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2022-10-28 10:21:54 -0700 |
commit | dc56c673e3b0d206f1d3fca66fdf5f6a46dbc4b2 (patch) | |
tree | 56d70fdadaa5e30cf90ab456141ed4ca5afb1c37 /module/zfs/arc.c | |
parent | 7822b50f548e6ca73faa6f0d2de029e981be1d73 (diff) |
Fix ARC target collapse when zfs_arc_meta_limit_percent=100
Reclaim metadata when arc_available_memory < 0 even if
meta_used is not bigger than arc_meta_limit.
As described in https://github.com/openzfs/zfs/issues/14054 if
zfs_arc_meta_limit_percent=100 then ARC target can collapse to
arc_min due to arc_purge not freeing any metadata.
This patch lets arc_prune to do its work when arc_available_memory
is negative even if meta_used is not bigger than arc_meta_limit,
avoiding ARC target collapse.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Gionatan Danti <[email protected]>
Closes #14054
Closes #14093
Diffstat (limited to 'module/zfs/arc.c')
-rw-r--r-- | module/zfs/arc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c index 936bcb5e3..1f97631f9 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -4469,7 +4469,7 @@ restart: * meta buffers. Requests to the upper layers will be made with * increasingly large scan sizes until the ARC is below the limit. */ - if (meta_used > arc_meta_limit) { + if (meta_used > arc_meta_limit || arc_available_memory() < 0) { if (type == ARC_BUFC_DATA) { type = ARC_BUFC_METADATA; } else { |