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 <[email protected]>
Sponsored by:	iXsystems, Inc.
  • Loading branch information
amotin committed Aug 2, 2024
1 parent c8184d7 commit 4cdcce1
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 4cdcce1

Please sign in to comment.