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 43B5A6B00E7 for ; Wed, 22 Feb 2012 11:29:44 -0500 (EST) Date: Wed, 22 Feb 2012 10:29:40 -0600 (CST) From: Christoph Lameter Subject: Re: [PATCH] oom: add sysctl to enable slab memory dump In-Reply-To: <20120222161440.GB1986@x61.redhat.com> Message-ID: References: <20120222115320.GA3107@x61.redhat.com> <20120222161440.GB1986@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, Randy Dunlap , Pekka Enberg , Matt Mackall , Rik van Riel , Josef Bacik , linux-kernel@vger.kernel.org On Wed, 22 Feb 2012, Rafael Aquini wrote: > On Wed, Feb 22, 2012 at 07:55:16AM -0600, Christoph Lameter wrote: > > > > Please use node_nr_objects() instead of directly accessing total_objects. > > total_objects are only available if debugging support was compiled in. > > > Shame on me! I've wrongly assumed that it would be safe accessing > the element because SLUB_DEBUG is turned on by default when slub is chosen. > > Considering your note on my previous mistake, shall I assume now that it > would be better having this whole dump feature dependable on CONFIG_SLUB_DEBUG, > instead of just CONFIG_SLUB ? That is certainly one solution. If CONFIG_SLUB_DEBUG is not set then support for maintaining a total count is not compiled in. You can of course still approximate that from the total number of slabs allocated and multiply that number by the # of objs per slab page. -- 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