[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1707041434380.9000@nanos>
Date: Tue, 4 Jul 2017 14:35:59 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Vlastimil Babka <vbabka@...e.cz>
cc: LKML <linux-kernel@...r.kernel.org>, linux-mm@...ck.org,
Andrey Ryabinin <aryabinin@...tuozzo.com>,
Michal Hocko <mhocko@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Vladimir Davydov <vdavydov.dev@...il.com>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [patch V2 1/2] mm: swap: Provide
lru_add_drain_all_cpuslocked()
On Tue, 4 Jul 2017, Vlastimil Babka wrote:
> >
> > -void lru_add_drain_all(void)
> > +void lru_add_drain_all_cpuslocked(void)
> > {
> > static DEFINE_MUTEX(lock);
> > static struct cpumask has_work;
> > @@ -701,7 +701,6 @@ void lru_add_drain_all(void)
> > return;
> >
> > mutex_lock(&lock);
> > - get_online_cpus();
>
> Is there a an assertion check that we are locked, that could be put in
> e.g. VM_WARN_ON_ONCE()?
There is a lockdep assertion lockdep_assert_cpus_held() which could be
used. Forgot to add it.
Thanks,
tglx
Powered by blists - more mailing lists