X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=mm%2Fvmstat.c;h=0982da3fd6e5aad2479ee5fc16fee01647d75233;hp=8fd603b1665e5be65bc10c93f146b860f706925d;hb=b18ae2b01891a7d279c241202f88447919eecdf8;hpb=a84f6aa68e35a911c28e5871c87356dce3607b40 diff --git a/mm/vmstat.c b/mm/vmstat.c index 8fd603b1665e..0982da3fd6e5 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -613,6 +613,9 @@ static char * const migratetype_names[MIGRATE_TYPES] = { "Reclaimable", "Movable", "Reserve", +#ifdef CONFIG_CMA + "CMA", +#endif "Isolate", }; @@ -699,6 +702,7 @@ const char * const vmstat_text[] = { "nr_slab_unreclaimable", "nr_page_table_pages", "nr_kernel_stack", + "nr_overhead", "nr_unstable", "nr_bounce", "nr_vmscan_write", @@ -890,7 +894,7 @@ static void pagetypeinfo_showblockcount_print(struct seq_file *m, seq_putc(m, '\n'); } -/* Print out the free pages at each order for each migratetype */ +/* Print out the number of pageblocks for each migratetype */ static int pagetypeinfo_showblockcount(struct seq_file *m, void *arg) { int mtype; @@ -1139,13 +1143,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)); } @@ -1154,7 +1159,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)); } /* @@ -1202,6 +1207,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)