mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
Fix for ARC sysctls ignored at runtime
This change leverage module_param_call() to run arc_tuning_update()
immediately after the ARC tunable has been updated as suggested in
cffa8372 code review.
A simple test case is added to the ZFS Test Suite to prevent future
regressions in functionality.
Reviewed-by: Matt Macy <mmacy@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #9487
Closes #9489
This commit is contained in:
committed by
Brian Behlendorf
parent
6963414d70
commit
e35704647e
@@ -357,6 +357,34 @@ arc_lowmem_fini(void)
|
||||
{
|
||||
spl_unregister_shrinker(&arc_shrinker);
|
||||
}
|
||||
|
||||
int
|
||||
param_set_arc_long(const char *buf, zfs_kernel_param_t *kp)
|
||||
{
|
||||
int error;
|
||||
|
||||
error = param_set_long(buf, kp);
|
||||
if (error < 0)
|
||||
return (SET_ERROR(error));
|
||||
|
||||
arc_tuning_update();
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
param_set_arc_int(const char *buf, zfs_kernel_param_t *kp)
|
||||
{
|
||||
int error;
|
||||
|
||||
error = param_set_int(buf, kp);
|
||||
if (error < 0)
|
||||
return (SET_ERROR(error));
|
||||
|
||||
arc_tuning_update();
|
||||
|
||||
return (0);
|
||||
}
|
||||
#else /* _KERNEL */
|
||||
int64_t
|
||||
arc_available_memory(void)
|
||||
|
||||
Reference in New Issue
Block a user