diff options
author | Anton Blanchard <anton@samba.org> | 2009-04-02 19:56:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-02 22:04:48 -0400 |
commit | 98f4ebb290a7dca8c48f27ec1d2cab8fa7982dad (patch) | |
tree | 4bad1464ee372de6789e95cb18b56ce54dd3ef27 /mm/vmstat.c | |
parent | d2caa3c549c74d6476e2c29e13bd4d0e7d21c7fe (diff) |
mm: align vmstat_work's timer
Even though vmstat_work is marked deferrable, there are still benefits to
aligning it. For certain applications we want to keep OS jitter as low as
possible and aligning timers and work so they occur together can reduce
their overall impact.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmstat.c')
-rw-r--r-- | mm/vmstat.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c index 9826766f1274..66f6130976cb 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c | |||
@@ -891,7 +891,7 @@ static void vmstat_update(struct work_struct *w) | |||
891 | { | 891 | { |
892 | refresh_cpu_vm_stats(smp_processor_id()); | 892 | refresh_cpu_vm_stats(smp_processor_id()); |
893 | schedule_delayed_work(&__get_cpu_var(vmstat_work), | 893 | schedule_delayed_work(&__get_cpu_var(vmstat_work), |
894 | sysctl_stat_interval); | 894 | round_jiffies_relative(sysctl_stat_interval)); |
895 | } | 895 | } |
896 | 896 | ||
897 | static void __cpuinit start_cpu_timer(int cpu) | 897 | static void __cpuinit start_cpu_timer(int cpu) |
@@ -899,7 +899,8 @@ static void __cpuinit start_cpu_timer(int cpu) | |||
899 | struct delayed_work *vmstat_work = &per_cpu(vmstat_work, cpu); | 899 | struct delayed_work *vmstat_work = &per_cpu(vmstat_work, cpu); |
900 | 900 | ||
901 | INIT_DELAYED_WORK_DEFERRABLE(vmstat_work, vmstat_update); | 901 | INIT_DELAYED_WORK_DEFERRABLE(vmstat_work, vmstat_update); |
902 | schedule_delayed_work_on(cpu, vmstat_work, HZ + cpu); | 902 | schedule_delayed_work_on(cpu, vmstat_work, |
903 | __round_jiffies_relative(HZ, cpu)); | ||
903 | } | 904 | } |
904 | 905 | ||
905 | /* | 906 | /* |