The patch titled Subject: vmstat ondemand: fix online/offline races has been added to the -mm tree. Its filename is vmstat-on-demand-vmstat-workers-v8-fix-2.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/vmstat-on-demand-vmstat-workers-v8-fix-2.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/vmstat-on-demand-vmstat-workers-v8-fix-2.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Christoph Lameter <cl@xxxxxxxxxx> Subject: vmstat ondemand: fix online/offline races Do not allow onlining/offlining while the shepherd task is checking for vmstat threads. On offlining a processor do the right thing cancelling the vmstat worker thread if it exista and also exclude it from the shepherd process checks. Signed-off-by: Christoph Lameter <cl@xxxxxxxxx> Cc: Gilad Ben-Yossef <gilad@xxxxxxxxxxxxx> Cc: Tejun Heo <tj@xxxxxxxxxx> Cc: Sasha Levin <sasha.levin@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/vmstat.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff -puN mm/vmstat.c~vmstat-on-demand-vmstat-workers-v8-fix-2 mm/vmstat.c --- a/mm/vmstat.c~vmstat-on-demand-vmstat-workers-v8-fix-2 +++ a/mm/vmstat.c @@ -1317,6 +1317,7 @@ static void vmstat_shepherd(struct work_ { int cpu; + get_online_cpus(); /* Check processors whose vmstat worker threads have been disabled */ for_each_cpu(cpu, cpu_stat_off) if (need_update(cpu) && @@ -1325,6 +1326,7 @@ static void vmstat_shepherd(struct work_ schedule_delayed_work_on(cpu, &per_cpu(vmstat_work, cpu), __round_jiffies_relative(sysctl_stat_interval, cpu)); + put_online_cpus(); schedule_delayed_work(&shepherd, round_jiffies_relative(sysctl_stat_interval)); @@ -1380,8 +1382,8 @@ static int vmstat_cpuup_callback(struct break; case CPU_DOWN_PREPARE: case CPU_DOWN_PREPARE_FROZEN: - if (!cpumask_test_and_set_cpu(cpu, cpu_stat_off)) - cancel_delayed_work_sync(&per_cpu(vmstat_work, cpu)); + cancel_delayed_work_sync(&per_cpu(vmstat_work, cpu)); + cpumask_clear_cpu(cpu, cpu_stat_off); break; case CPU_DOWN_FAILED: case CPU_DOWN_FAILED_FROZEN: _ Patches currently in -mm which might be from cl@xxxxxxxxxx are origin.patch slab-common-add-functions-for-kmem_cache_node-access-fix.patch slub-use-new-node-functions-fix.patch slab-use-get_node-and-kmem_cache_node-functions-fix.patch slab-use-get_node-and-kmem_cache_node-functions-fix-2.patch vmstat-on-demand-vmstat-workers-v8.patch vmstat-on-demand-vmstat-workers-v8-do-not-open-code-alloc_cpumask_var.patch vmstat-on-demand-vmstat-workers-v8-fix-2.patch kernel-smpc-on_each_cpu_cond-fix-warning-in-fallback-path.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html