HomeFreeBSD

Unify arc_prune_async() code, fix excessive ARC pruning

Description

Unify arc_prune_async() code, fix excessive ARC pruning

There is no sense to have separate implementations for FreeBSD and Linux. Make
Linux code shared as more functional and just register FreeBSD-specific prune
callback with arc_add_prune_callback() API.

Aside of code cleanup this fixes excessive pruning on FreeBSD.

[olce: This code comes from the OpenZFS pull request:
https://github.com/openzfs/zfs/pull/16083, vendor-merged into our tree. Its
commit message has been slightly adapted to the present context. The upstream
pull request has been reviewed and merged into 'zfs-2.1.16-staging' as
5b81b1bf5e6d6aeb8a87175dcb12b529185cac2f, which should come into our tree at the
next vendor import. This is the same code that was merged into stable/14 and
main as part of vendor merges, and released as an EN (FreeBSD-EN-23:18.openzfs)
over releng/14.0 by markj@.]

PR: 275594, 274698
Reported by: Seigo Tanimura <seigo.tanimura@gmail.com>, markj, and others
Tested by: olce
Approved by: emaste (mentor)
Approved by: so
Obtained from: OpenZFS
Sponsored by: iXsystems, Inc.
Sponsored by: The FreeBSD Foundation
Signed-off-by: Alexander Motin <mav@FreeBSD.org>

(cherry picked from commit 330954bdb822af6bc07d487b1ecd7f8fda9c4def)

Details

Provenance
mavAuthored on Oct 30 2023, 11:56 PM
gordonCommitted on Wed, Apr 24, 8:06 PM
Parents
rG7a0d63c90932: Add UPDATING entries and bump the branch version.
Branches
Unknown
Tags
Unknown