diff options
author | Alexander Motin <mav@FreeBSD.org> | 2022-09-02 20:21:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-02 20:21:18 +0000 |
commit | f933b3fd4dda8b37aa37aeae05951b76f51ddae7 (patch) | |
tree | 5856598fe904392d772472175863fe89e02da215 /module/zfs/arc.c | |
parent | 0b30dc484f7e70bc8bfe53fefc8581d181044efa (diff) | |
download | src-f933b3fd4dda8b37aa37aeae05951b76f51ddae7.tar.gz src-f933b3fd4dda8b37aa37aeae05951b76f51ddae7.zip |
Diffstat (limited to 'module/zfs/arc.c')
-rw-r--r-- | module/zfs/arc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c index 579e78befe18..980dc60d0cc0 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -5051,10 +5051,11 @@ arc_reap_cb(void *arg, zthr_t *zthr) */ free_memory = arc_available_memory(); - int64_t to_free = - (arc_c >> arc_shrink_shift) - free_memory; - if (to_free > 0) { - arc_reduce_target_size(to_free); + int64_t can_free = arc_c - arc_c_min; + if (can_free > 0) { + int64_t to_free = (can_free >> arc_shrink_shift) - free_memory; + if (to_free > 0) + arc_reduce_target_size(to_free); } spl_fstrans_unmark(cookie); } |