Skip to content

Commit cdd53fe

Browse files
amotintonyhutter
authored andcommitted
FreeBSD: Add missing memory reclamation accounting
Signed-off-by: Alexander Motin <[email protected]> Sponsored by: iXsystems, Inc. Reviewed-by: Tino Reichardt <[email protected]> Reviewed-by: Umer Saleem <[email protected]> Reviewed-by: Ameer Hamza <[email protected]> Reviewed-by: Tony Hutter <[email protected]>
1 parent c8184d7 commit cdd53fe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

module/os/freebsd/zfs/arc_os.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,12 @@ arc_lowmem(void *arg __unused, int howto __unused)
166166
* here from ARC itself and may hold ARC locks and thus risk a deadlock
167167
* with ARC reclaim thread.
168168
*/
169-
if (curproc == pageproc)
169+
if (curproc == pageproc) {
170170
arc_wait_for_eviction(to_free, B_FALSE, B_FALSE);
171+
ARCSTAT_BUMP(arcstat_memory_indirect_count);
172+
} else {
173+
ARCSTAT_BUMP(arcstat_memory_direct_count);
174+
}
171175
}
172176

173177
void

0 commit comments

Comments
 (0)