Skip to content

Commit

Permalink
FreeBSD: Add missing memory reclamation accounting
Browse files Browse the repository at this point in the history
Signed-off-by:	Alexander Motin <mav@FreeBSD.org>
Sponsored by:	iXsystems, Inc.

Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: Umer Saleem <usaleem@ixsystems.com>
Reviewed-by: Ameer Hamza <ahamza@ixsystems.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
  • Loading branch information
amotin authored and lundman committed Sep 4, 2024
1 parent 97fa031 commit 14211b6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion module/os/freebsd/zfs/arc_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,12 @@ arc_lowmem(void *arg __unused, int howto __unused)
* here from ARC itself and may hold ARC locks and thus risk a deadlock
* with ARC reclaim thread.
*/
if (curproc == pageproc)
if (curproc == pageproc) {
arc_wait_for_eviction(to_free, B_FALSE, B_FALSE);
ARCSTAT_BUMP(arcstat_memory_indirect_count);
} else {
ARCSTAT_BUMP(arcstat_memory_direct_count);
}
}

void
Expand Down

0 comments on commit 14211b6

Please sign in to comment.