Re: [patch V2 1/2] mm: swap: Provide lru_add_drain_all_cpuslocked()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux