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 <mmacy@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #10371
This commit is contained in:
Ryan Moeller
2020-06-03 12:52:38 -04:00
committed by GitHub
parent 081de9a86d
commit a9dcfac51c
+2 -2
View File
@@ -7360,8 +7360,8 @@ arc_init(void)
kstat_install(arc_ksp); kstat_install(arc_ksp);
} }
arc_adjust_zthr = zthr_create(arc_adjust_cb_check, arc_adjust_zthr = zthr_create_timer(arc_adjust_cb_check,
arc_adjust_cb, NULL); arc_adjust_cb, NULL, SEC2NSEC(1));
arc_reap_zthr = zthr_create_timer(arc_reap_cb_check, arc_reap_zthr = zthr_create_timer(arc_reap_cb_check,
arc_reap_cb, NULL, SEC2NSEC(1)); arc_reap_cb, NULL, SEC2NSEC(1));