aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorJustin Gottula <[email protected]>2019-03-12 15:03:59 -0700
committerBrian Behlendorf <[email protected]>2019-03-12 15:03:59 -0700
commitcffa8372f42be4b37931d3cd24b01e837aa123b6 (patch)
tree6f5368e71302bfba282706bd52309244f57041db /module
parent4c0883fb4af0d5565459099b98fcf90ecbfa1ca1 (diff)
Fix most zfs_arc_* mod params not actually being modifiable at runtime
Most of the zfs_arc_* module parameters do not have their values used by the ARC code directly. Instead, there is a function, arc_tuning_update, which is called during module initialization and periodically thereafter, whose job is to fetch the module parameter values, clamp/ limit them appropriately, and then assign those values to a separate set of internal variables that are actually referenced by the ARC code. Commit 3ec34e55 featured an overhaul of arc_reclaim_thread, which is the former location where the post-init-time calls to arc_tuning_update would occur. The rework split the work previously done by the arc_reclaim_thread into a pair of replacement threads; and unfortunately, the call to arc_tuning_update fell through the cracks and was lost in the reorganization. This meant that changing almost any ARC-related zfs module parameter via /sys/module/zfs/parameters/ would result in the module parameter value itself appearing to change; however the modification would not actually propagate to the ARC code and have any real effect. This commit reinstates the post-init-time call to arc_tuning_update. It is now called during arc_adjust_cb_check; this should be equivalent to its former call location in arc_reclaim_thread. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Justin Gottula <[email protected]> Closes #8405 Closes #8463
Diffstat (limited to 'module')
-rw-r--r--module/zfs/arc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c
index 9072b6582..637333ed2 100644
--- a/module/zfs/arc.c
+++ b/module/zfs/arc.c
@@ -5077,6 +5077,14 @@ static boolean_t
arc_adjust_cb_check(void *arg, zthr_t *zthr)
{
/*
+ * This is necessary so that any changes which may have been made to
+ * many of the zfs_arc_* module parameters will be propagated to
+ * their actual internal variable counterparts. Without this,
+ * changing those module params at runtime would have no effect.
+ */
+ arc_tuning_update();
+
+ /*
* This is necessary in order to keep the kstat information
* up to date for tools that display kstat data such as the
* mdb ::arc dcmd and the Linux crash utility. These tools