From 5219a2691e3b3de5b69bc3c97b8f58c272d6fe04 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Fri, 17 Mar 2023 20:31:08 -0400 Subject: [PATCH] FreeBSD: Remove extra arc_reduce_target_size() call Remove arc_reduce_target_size() call from arc_prune_task(). The idea of arc_prune_task() is to remove external references on ARC metadata, such as vnodes. Since arc_prune_async() is called only from ARC itself, it makes no sense to create a parasitic loop between ARC eviction and the pruning, treatening to drop ARC to its minimum. I can't guess why it was added as part of FreeBSD to OpenZFS integration. Reviewed-by: Brian Behlendorf Reviewed-by: Brian Atkinson Signed-off-by: Alexander Motin Sponsored by: iXsystems, Inc. Closes #14639 --- module/os/freebsd/zfs/arc_os.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/module/os/freebsd/zfs/arc_os.c b/module/os/freebsd/zfs/arc_os.c index 590d1c04b9..3dd49f0552 100644 --- a/module/os/freebsd/zfs/arc_os.c +++ b/module/os/freebsd/zfs/arc_os.c @@ -160,8 +160,6 @@ arc_prune_task(void *arg) { int64_t nr_scan = (intptr_t)arg; - arc_reduce_target_size(ptob(nr_scan)); - #ifndef __ILP32__ if (nr_scan > INT_MAX) nr_scan = INT_MAX;