Skip to content

Commit

Permalink
Periodically update ARC kstats
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Ryan Moeller authored Jun 3, 2020
1 parent 081de9a commit a9dcfac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/zfs/arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit a9dcfac

Please sign in to comment.