From a9dcfac51caa6abaff3742abd91a6a5bcaa747a5 Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Wed, 3 Jun 2020 12:52:38 -0400 Subject: [PATCH] Periodically update ARC kstats FreeBSD needs arc_adjust_zthr to run periodically for kstats to be updated. A comment in the code suggests this may have been the original intent in illumos as well: https://github.com/openzfs/zfs/blob/c946d5a91329b075fb9bda1ac703a2e85139cf1c/module/zfs/arc.c#L4697-L4700 Create the thread with a 1 second timer. Reviewed-by: Matt Macy Reviewed-by: Brian Behlendorf Signed-off-by: Ryan Moeller Closes #10371 --- module/zfs/arc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/zfs/arc.c b/module/zfs/arc.c index 4f2207ae7831..29da08a491b2 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -7360,8 +7360,8 @@ arc_init(void) kstat_install(arc_ksp); } - arc_adjust_zthr = zthr_create(arc_adjust_cb_check, - arc_adjust_cb, NULL); + arc_adjust_zthr = zthr_create_timer(arc_adjust_cb_check, + arc_adjust_cb, NULL, SEC2NSEC(1)); arc_reap_zthr = zthr_create_timer(arc_reap_cb_check, arc_reap_cb, NULL, SEC2NSEC(1));