Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030452Ab2CAB0L (ORCPT ); Wed, 29 Feb 2012 20:26:11 -0500 Received: from mail-pz0-f52.google.com ([209.85.210.52]:48282 "EHLO mail-pz0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756388Ab2CAB0J (ORCPT ); Wed, 29 Feb 2012 20:26:09 -0500 Authentication-Results: mr.google.com; spf=pass (google.com: domain of rientjes@google.com designates 10.68.228.41 as permitted sender) smtp.mail=rientjes@google.com; dkim=pass header.i=rientjes@google.com Date: Wed, 29 Feb 2012 17:26:07 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com 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 Subject: Re: [PATCH] mm: SLAB Out-of-memory diagnostics In-Reply-To: <20120229032715.GA23758@t510.redhat.com> Message-ID: References: <20120229032715.GA23758@t510.redhat.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1147 Lines: 25 On Wed, 29 Feb 2012, Rafael Aquini wrote: > Following the example at mm/slub.c, add out-of-memory diagnostics to the SLAB > allocator to help on debugging OOM conditions. This patch also adds a new > sysctl, 'oom_dump_slabs_forced', that overrides the effect of __GFP_NOWARN page > allocation flag and forces the kernel to report every slab allocation failure. > > An example print out looks like this: > > > SLAB: Unable to allocate memory on node 0 (gfp=0x11200) > cache: bio-0, object size: 192, order: 0 > node0: slabs: 3/3, objs: 60/60, free: 0 > > Signed-off-by: Rafael Aquini I like it, except for the addition of the sysctl. __GFP_NOWARN is used for a reason, usually because whatever is allocating memory can gracefully handle a failure and should not be emitted to the kernel log under any circumstances. -- 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/