Re: BUG: using __this_cpu_read() in preemptible  code: mm_percpu_wq/7
From: Christopher Lameter
Date: Wed Jul 12 2017 - 11:46:16 EST
On Wed, 7 Jun 2017, Andre Wild wrote:
> I'm currently seeing the following message running kernel version 4.11.0.
> It looks like it was introduced with the patch
A 2007 patch? At that point we did not have __this_cpu_read() nor
refresh_cpu_vmstats.... Is this on s390 or some such architecture?
> Can you please take a look at this problem?
Could you give me a bit more context?
> [Tue Jun 6 15:27:03 2017] BUG: using __this_cpu_read() in preemptible
>  code: mm_percpu_wq/7
> [Tue Jun 6 15:27:03 2017] caller is refresh_cpu_vm_stats+0x198/0x3d8
> [Tue Jun 6 15:27:03 2017] CPU: 0 PID: 7 Comm: mm_percpu_wq Tainted: G
> W 4.11.0-20170529.0.ae409ab.224a322.fc25.s390xdefault #1
> [Tue Jun 6 15:27:03 2017] Workqueue: mm_percpu_wq vmstat_update
It is run in preemptible mode but this from a kworker
context so the processor cannot change (see vmstat_refresh()).
Even on s390 or so this should be fine.