Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1314281
| From | Christoph Lameter <cl@linux.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: mm, vmstat: kernel BUG at mm/vmstat.c:1408! |
| Date | 2016-01-21 16:50 +0100 |
| Message-ID | <qTpEK-7eF-5@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <qT3kS-aT-15@gated-at.bofh.it> <qT3kU-aT-57@gated-at.bofh.it> <qT8ue-3LS-11@gated-at.bofh.it> <qT8Xg-3WS-13@gated-at.bofh.it> <qTiMW-2Ez-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, 21 Jan 2016, Michal Hocko wrote:
> > > Since 0eb77e988032 ("vmstat: make vmstat_updater deferrable again and
> > > shut down on idle") quiet_vmstat might update cpu_stat_off and mark a
> > > particular cpu to be handled by vmstat_shepherd. This might trigger
> > > a VM_BUG_ON in vmstat_update because the work item might have been
> > > sleeping during the idle period and see the cpu_stat_off updated after
> > > the wake up. The VM_BUG_ON is therefore misleading and no more
> > > appropriate. Moreover it doesn't really suite any protection from real
> > > bugs because vmstat_shepherd will simply reschedule the vmstat_work
> > > anytime it sees a particular cpu set or vmstat_update would do the same
> > > from the worker context directly. Even when the two would race the
> > > result wouldn't be incorrect as the counters update is fully idempotent.
> >
> >
> > Hmmm... the vmstat_update can be interrupted while running and the cpu put
> > into idle mode? If vmstat_update is running then the cpu is not idle but
> > running code. If this is really going on then there is other stuff wrong
> > with the idling logic.
>
> The vmstat update might be still waiting for its timer, idle mode started
> and kick vmstat_update which might cpumask_test_and_set_cpu. Once the
> idle terminates and the originally schedule vmstate_update executes it
> sees the bit set and BUG_ON.
Ok so we are going into idle mode and the vmstat_update timer is pending.
Then the timer will not fire since going idle switches preemption off.
quiet_vmstat will run without the chance of running vmstat_update
We could be going idle and not have disabled preemption yet. Then
vmstat_update will run. On return to the idling operation preemption will
be disabled and quiet_vmstat() will be run.
I do not see how these two things could race.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: mm, vmstat: kernel BUG at mm/vmstat.c:1408! Michal Hocko <mhocko@kernel.org> - 2016-01-20 15:40 +0100
Re: mm, vmstat: kernel BUG at mm/vmstat.c:1408! Sasha Levin <sasha.levin@oracle.com> - 2016-01-20 16:00 +0100
Re: mm, vmstat: kernel BUG at mm/vmstat.c:1408! Michal Hocko <mhocko@kernel.org> - 2016-01-20 16:20 +0100
Re: mm, vmstat: kernel BUG at mm/vmstat.c:1408! Christoph Lameter <cl@linux.com> - 2016-01-20 16:30 +0100
Re: mm, vmstat: kernel BUG at mm/vmstat.c:1408! Sasha Levin <sasha.levin@oracle.com> - 2016-01-20 17:00 +0100
Re: mm, vmstat: kernel BUG at mm/vmstat.c:1408! Christoph Lameter <cl@linux.com> - 2016-01-20 17:00 +0100
Re: mm, vmstat: kernel BUG at mm/vmstat.c:1408! Michal Hocko <mhocko@kernel.org> - 2016-01-20 22:30 +0100
Re: mm, vmstat: kernel BUG at mm/vmstat.c:1408! Christoph Lameter <cl@linux.com> - 2016-01-20 23:00 +0100
Re: mm, vmstat: kernel BUG at mm/vmstat.c:1408! Michal Hocko <mhocko@kernel.org> - 2016-01-21 09:30 +0100
Re: mm, vmstat: kernel BUG at mm/vmstat.c:1408! Christoph Lameter <cl@linux.com> - 2016-01-21 16:50 +0100
Re: mm, vmstat: kernel BUG at mm/vmstat.c:1408! Michal Hocko <mhocko@kernel.org> - 2016-01-21 18:00 +0100
Re: mm, vmstat: kernel BUG at mm/vmstat.c:1408! Christoph Lameter <cl@linux.com> - 2016-01-21 18:40 +0100
Re: mm, vmstat: kernel BUG at mm/vmstat.c:1408! Shiraz Hashim <shiraz.linux.kernel@gmail.com> - 2016-01-22 12:10 +0100
Re: mm, vmstat: kernel BUG at mm/vmstat.c:1408! Michal Hocko <mhocko@kernel.org> - 2016-01-22 15:10 +0100
Re: mm, vmstat: kernel BUG at mm/vmstat.c:1408! Christoph Lameter <cl@linux.com> - 2016-01-22 17:10 +0100
Re: mm, vmstat: kernel BUG at mm/vmstat.c:1408! Michal Hocko <mhocko@kernel.org> - 2016-01-22 17:20 +0100
Re: mm, vmstat: kernel BUG at mm/vmstat.c:1408! Christoph Lameter <cl@linux.com> - 2016-01-22 17:50 +0100
Re: mm, vmstat: kernel BUG at mm/vmstat.c:1408! Michal Hocko <mhocko@kernel.org> - 2016-01-22 18:20 +0100
fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-01-23 17:30 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Christoph Lameter <cl@linux.com> - 2016-01-24 01:40 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-01-24 03:50 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Christoph Lameter <cl@linux.com> - 2016-01-24 04:50 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-01-24 06:40 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Michal Hocko <mhocko@kernel.org> - 2016-01-25 18:50 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Christoph Lameter <cl@linux.com> - 2016-01-25 19:10 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Michal Hocko <mhocko@kernel.org> - 2016-01-25 21:20 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Christoph Lameter <cl@linux.com> - 2016-01-26 17:30 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Christoph Lameter <cl@linux.com> - 2016-01-26 19:40 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-01-26 19:50 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Christoph Lameter <cl@linux.com> - 2016-01-26 20:30 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-01-27 04:20 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-01-27 05:20 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Christoph Lameter <cl@linux.com> - 2016-01-27 17:30 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-01-26 19:40 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-01-26 03:20 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-01-26 03:30 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Christoph Lameter <cl@linux.com> - 2016-01-26 17:30 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-01-26 18:40 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Christoph Lameter <cl@linux.com> - 2016-01-26 19:20 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Christoph Lameter <cl@linux.com> - 2016-01-26 17:30 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-01-26 18:10 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Christoph Lameter <cl@linux.com> - 2016-01-26 19:30 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-01-26 20:10 +0100
Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable again and shut down on idle) Christoph Lameter <cl@linux.com> - 2016-01-26 20:30 +0100
[PATCH] mm, vmstat: make quiet_vmstat lighter (was: Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable) again and shut down on idle) Michal Hocko <mhocko@kernel.org> - 2016-01-27 17:50 +0100
Re: [PATCH] mm, vmstat: make quiet_vmstat lighter (was: Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable) again and shut down on idle) Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-01-27 18:10 +0100
Re: [PATCH] mm, vmstat: make quiet_vmstat lighter (was: Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable) again and shut down on idle) Christoph Lameter <cl@linux.com> - 2016-01-27 19:30 +0100
Re: mm, vmstat: kernel BUG at mm/vmstat.c:1408! Linus Torvalds <torvalds@linux-foundation.org> - 2016-01-24 18:00 +0100
Re: mm, vmstat: kernel BUG at mm/vmstat.c:1408! Christoph Lameter <cl@linux.com> - 2016-01-20 16:20 +0100
Re: mm, vmstat: kernel BUG at mm/vmstat.c:1408! Michal Hocko <mhocko@kernel.org> - 2016-01-20 16:30 +0100
csiph-web