Re: mm, vmstat: kernel BUG at mm/vmstat.c:1408!
From: Michal Hocko
Date: Fri Jan 22 2016 - 09:04:34 EST
On Thu 21-01-16 11:38:46, Christoph Lameter wrote:
> On Thu, 21 Jan 2016, Michal Hocko wrote:
>
> > It goes like this:
> > CPU0: CPU1
> > vmstat_update
> > cpumask_test_and_set_cpu (0->1)
> > [...]
> > vmstat_shepherd
> > <enter idle> cpumask_test_and_clear_cpu(CPU0) (1->0)
> > quiet_vmstat
> > cpumask_test_and_set_cpu (0->1)
> > queue_delayed_work_on(CPU0)
> > refresh_cpu_vm_stats()
> > [...]
> > vmstat_update
> > nothing_to_do
> > cpumask_test_and_set_cpu (1->1)
> > VM_BUG_ON
> >
> > Or am I missing something?
>
> Ok then the following should fix it:
Wouldn't it be much more easier and simply get rid of the VM_BUG_ON?
What is the point of keeping it in the first place. The code can
perfectly cope with the race.
--
Michal Hocko
SUSE Labs