Re: [PATCH -v2] mm: SLAB Out-of-memory diagnostics

From: Rafael Aquini
Date: Wed Mar 07 2012 - 09:20:26 EST


Howdy David,

On Tue, Mar 06, 2012 at 07:41:55PM -0800, David Rientjes wrote:
> > + spin_lock_irqsave(&l3->list_lock, flags);
>
> Could be spin_lock_irq(&l3->list_lock);

I don't think it would be safe making such assumption.

Note that spin_lock_irqsave() is used at slab_out_of_memory() because we cannot
guarantee that interrupts will be enabled/disabled by the time kmem_getpages()
is called in cache_grow() or fallback_alloc().

Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/