X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=mm%2Fvmstat.c;h=901e6315b726c31ef5ff5b9dd845a3100cf49825;hp=414f4a6ce5afb5cd475d4e088812c11dc0251c18;hb=a592f46075d79ff7348e624e7d871dca730e70f2;hpb=fec8ddd2a735a9e20845a057227ab37eb634e7ea diff --git a/mm/vmstat.c b/mm/vmstat.c index 414f4a6ce5af..901e6315b726 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -1142,13 +1142,14 @@ static const struct file_operations proc_vmstat_file_operations = { #endif /* CONFIG_PROC_FS */ #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; static void vmstat_update(struct work_struct *w) { refresh_cpu_vm_stats(smp_processor_id()); - schedule_delayed_work(&__get_cpu_var(vmstat_work), + queue_delayed_work(vmstat_wq, &__get_cpu_var(vmstat_work), round_jiffies_relative(sysctl_stat_interval)); } @@ -1157,7 +1158,7 @@ static void __cpuinit start_cpu_timer(int cpu) struct delayed_work *work = &per_cpu(vmstat_work, cpu); INIT_DELAYED_WORK_DEFERRABLE(work, vmstat_update); - schedule_delayed_work_on(cpu, work, __round_jiffies_relative(HZ, cpu)); + queue_delayed_work_on(cpu, vmstat_wq, work, __round_jiffies_relative(HZ, cpu)); } /* @@ -1205,6 +1206,8 @@ static int __init setup_vmstat(void) #ifdef CONFIG_SMP int cpu; + vmstat_wq = alloc_workqueue("vmstat", WQ_FREEZABLE|WQ_MEM_RECLAIM, 0); + register_cpu_notifier(&vmstat_notifier); for_each_online_cpu(cpu)