Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756273AbZFHN6b (ORCPT ); Mon, 8 Jun 2009 09:58:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756065AbZFHN6K (ORCPT ); Mon, 8 Jun 2009 09:58:10 -0400 Received: from courier.cs.helsinki.fi ([128.214.9.1]:39574 "EHLO mail.cs.helsinki.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755899AbZFHN6J (ORCPT ); Mon, 8 Jun 2009 09:58:09 -0400 Date: Mon, 8 Jun 2009 16:58:10 +0300 (EEST) From: Pekka J Enberg To: Mel Gorman cc: Rik van Riel , Larry Finger , "Rafael J. Wysocki" , Linux Kernel Mailing List , Kernel Testers List , Johannes Berg , Andrew Morton , KOSAKI Motohiro , KAMEZAWA Hiroyuki , Christoph Lameter Subject: Re: [Bug #13319] Page allocation failures with b43 and p54usb In-Reply-To: <20090608110303.GD15377@csn.ul.ie> Message-ID: References: <4A2BBC30.2030300@lwfinger.net> <84144f020906070640rf5ab14nbf66d3ca7c97675f@mail.gmail.com> <4A2BCC6F.8090004@redhat.com> <84144f020906070732l31786156r5d9753a0cabfde79@mail.gmail.com> <20090608101739.GA15377@csn.ul.ie> <84144f020906080352k57f12ff9pbd696da5f332ac1a@mail.gmail.com> <20090608110303.GD15377@csn.ul.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1279 Lines: 34 Hi Mel, On Mon, 8 Jun 2009, Mel Gorman wrote: > Is there any chance you could hatchet together a patch > slab-allocation-failure that reports on slab allocation failures similar > to what the page allocator does? Minimally, it should tell us what > the size of the allocation was but any other information such as the > same of the slab, the size of pages it normally uses are, etc. would > also be useful. Would something like this be sufficient? Figuring out the actual _size_ passed to kmalloc() is pretty difficult as then we would need to do the NULL test in fastpath code or pass the argument deeper in the call-chain. Pekka diff --git a/mm/slub.c b/mm/slub.c index 65ffda5..b5acf18 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1565,6 +1565,8 @@ new_slab: c->page = new; goto load_freelist; } + printk(KERN_WARNING "SLUB: unable to satisfy allocation for cache %s (size=%d, node=%d, gfp=%x)\n", + s->name, s->size, node, gfpflags); return NULL; debug: if (!alloc_debug_processing(s, c->page, object, addr)) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/