Re: [PATCH] memcg: Optimise relock_page_lruvec functions

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

 



On Mon, Oct 25, 2021 at 12:44:05PM +0200, Vlastimil Babka wrote:
> On 10/19/21 14:50, Matthew Wilcox (Oracle) wrote:
> > Leave interrupts disabled when we change which lru lock is held.
> > 
> > Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
> 
> Acked-by: Vlastimil Babka <vbabka@xxxxxxx>
> 
> Assuming lockdep is fine with e.g.:
> 
> spin_lock_irqsave(A);
> spin_unlock(A);
> spin_lock(B);
> spin_unlock_irqrestore(B);
> 
> (with A and B of same class).

It's unconditionally okay with that pattern. As far as lockdep
is concerned there really is no differences vs:

	local_irq_save()
	spin_lock(a)
	spin_unlock(a)
	spin_lock(b)
	spin_unlock(b)
	local_irq_restore()

It's the RT locking primitives that care about the difference :-)




[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