From cb18d88060100ced29da1900f5a35e3deded0b36 Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Sat, 25 Jul 2020 13:47:18 -0400 Subject: [PATCH] FreeBSD: Implement arc_free_memory This is only used for the kstat, but something other than 0 is nice. Reviewed-by: Brian Behlendorf Reviewed-by: Alexander Motin Signed-off-by: Ryan Moeller Closes #10626 --- module/os/freebsd/zfs/arc_os.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/module/os/freebsd/zfs/arc_os.c b/module/os/freebsd/zfs/arc_os.c index fc88e6e59..7415be919 100644 --- a/module/os/freebsd/zfs/arc_os.c +++ b/module/os/freebsd/zfs/arc_os.c @@ -192,7 +192,7 @@ arc_prune_async(int64_t adjust) uint64_t arc_all_memory(void) { - return ((uint64_t)ptob(physmem)); + return (ptob(physmem)); } int @@ -204,8 +204,7 @@ arc_memory_throttle(spa_t *spa, uint64_t reserve, uint64_t txg) uint64_t arc_free_memory(void) { - /* XXX */ - return (0); + return (ptob(freemem)); } static eventhandler_tag arc_event_lowmem = NULL;