The patch titled Subject: Revert mm/vmstat.c: fix vmstat_update() preemption BUG has been added to the -mm tree. Its filename is revert-mm-vmstatc-fix-vmstat_update-preemption-bug.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/revert-mm-vmstatc-fix-vmstat_update-preemption-bug.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/revert-mm-vmstatc-fix-vmstat_update-preemption-bug.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/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> Subject: Revert mm/vmstat.c: fix vmstat_update() preemption BUG Revert c7f26ccfb2c3 ("mm/vmstat.c: fix vmstat_update() preemption BUG"). Steven saw a "using smp_processor_id() in preemptible" message and added a preempt_disable() section around it to keep it quiet. This is not the right thing to do it does not fix the real problem. vmstat_update() is invoked by a kworker on a specific CPU. This worker it bound to this CPU. The name of the worker was "kworker/1:1" so it should have been a worker which was bound to CPU1. A worker which can run on any CPU would have a `u' before the first digit. smp_processor_id() can be used in a preempt-enabled region as long as the task is bound to a single CPU which is the case here. If it could run on an arbitrary CPU then this is the problem we have an should seek to resolve. Not only this smp_processor_id() must not be migrated to another CPU but also refresh_cpu_vm_stats() which might access wrong per-CPU variables. Not to mention that other code relies on the fact that such a worker runs on one specific CPU only. Therefore revert that commit and we should look instead what broke the affinity mask of the kworker. Link: http://lkml.kernel.org/r/20180504104451.20278-1-bigeasy@xxxxxxxxxxxxx Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> Cc: Steven J. Hill <steven.hill@xxxxxxxxxx> Cc: Tejun Heo <htejun@xxxxxxxxx> Cc: Vlastimil Babka <vbabka@xxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/vmstat.c | 2 -- 1 file changed, 2 deletions(-) diff -puN mm/vmstat.c~revert-mm-vmstatc-fix-vmstat_update-preemption-bug mm/vmstat.c --- a/mm/vmstat.c~revert-mm-vmstatc-fix-vmstat_update-preemption-bug +++ a/mm/vmstat.c @@ -1796,11 +1796,9 @@ static void vmstat_update(struct work_st * to occur in the future. Keep on running the * update worker thread. */ - preempt_disable(); queue_delayed_work_on(smp_processor_id(), mm_percpu_wq, this_cpu_ptr(&vmstat_work), round_jiffies_relative(sysctl_stat_interval)); - preempt_enable(); } } _ Patches currently in -mm which might be from bigeasy@xxxxxxxxxxxxx are lib-percpu_idac-dont-do-alloc-from-per-cpu-list-if-there-is-none.patch revert-mm-vmstatc-fix-vmstat_update-preemption-bug.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