From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx152.postini.com [74.125.245.152]) by kanga.kvack.org (Postfix) with SMTP id 7103C6B004A for ; Tue, 6 Mar 2012 22:41:58 -0500 (EST) Received: by iajr24 with SMTP id r24so10418205iaj.14 for ; Tue, 06 Mar 2012 19:41:57 -0800 (PST) Date: Tue, 6 Mar 2012 19:41:55 -0800 (PST) From: David Rientjes Subject: Re: [PATCH -v2] mm: SLAB Out-of-memory diagnostics In-Reply-To: <20120305181041.GA9829@x61.redhat.com> Message-ID: References: <20120305181041.GA9829@x61.redhat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Rafael Aquini Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Randy Dunlap , Christoph Lameter , Pekka Enberg , Matt Mackall , Rik van Riel , Josef Bacik On Mon, 5 Mar 2012, Rafael Aquini wrote: > diff --git a/mm/slab.c b/mm/slab.c > index f0bd785..4aeb5e7 100644 > --- a/mm/slab.c > +++ b/mm/slab.c > @@ -1731,6 +1731,52 @@ static int __init cpucache_init(void) > } > __initcall(cpucache_init); > > +static noinline void > +slab_out_of_memory(struct kmem_cache *cachep, gfp_t gfpflags, int nodeid) > +{ > + struct kmem_list3 *l3; > + struct slab *slabp; > + unsigned long flags; > + int node; > + > + printk(KERN_WARNING > + "SLAB: Unable to allocate memory on node %d (gfp=0x%x)\n", > + nodeid, gfpflags); > + printk(KERN_WARNING " cache: %s, object size: %d, order: %d\n", > + cachep->name, cachep->buffer_size, cachep->gfporder); > + > + for_each_online_node(node) { > + unsigned long active_objs = 0, num_objs = 0, free_objects = 0; > + unsigned long active_slabs = 0, num_slabs = 0; > + > + l3 = cachep->nodelists[node]; > + if (!l3) > + continue; > + > + spin_lock_irqsave(&l3->list_lock, flags); Could be spin_lock_irq(&l3->list_lock); -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org