mm: add Kconfig interface for vmstat interval

Signed-off-by: Tyler Nijmeh <tylernij@gmail.com>
Signed-off-by: kdrag0n <dragon@khronodragon.com>
Signed-off-by: Raphiel Rollerscaperers <rapherion@raphielgang.org>
Signed-off-by: DennySPB <dennyspb@gmail.com>
This commit is contained in:
Tyler Nijmeh
2018-10-12 22:40:55 -07:00
committed by DhineshCool
parent c68703b90a
commit fbdc84a9f9
2 changed files with 6 additions and 1 deletions

View File

@@ -759,3 +759,8 @@ config FORCE_ALLOC_FROM_DMA_ZONE
always using ZONE_DMA memory.
If unsure, say "n".
config VMSTAT_INTERVAL
int "Default interval in seconds to update vmstat"
default 1

View File

@@ -1564,7 +1564,7 @@ static const struct file_operations proc_vmstat_file_operations = {
#ifdef CONFIG_SMP
static struct workqueue_struct *vmstat_wq;
static DEFINE_PER_CPU(struct delayed_work, vmstat_work);
int sysctl_stat_interval __read_mostly = HZ;
int sysctl_stat_interval __read_mostly = CONFIG_VMSTAT_INTERVAL * HZ;
#ifdef CONFIG_PROC_FS
static void refresh_vm_stats(struct work_struct *work)