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)
Obtained from: OpenZFS
Sponsored by: iXsystems, Inc.
Sponsored by: The FreeBSD Foundation
Signed-off-by: Alexander Motin <mav@FreeBSD.org>

Details

Provenance
mavAuthored on Oct 30 2023, 11:56 PM
olceCommitted on Apr 12 2024, 1:00 PM
Parents
rGf0edd08b27d7: LinuxKPI: Remove the temporary variable fileid from the macro request_module
Branches
Unknown
Tags
Unknown