Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755164Ab0LBBVz (ORCPT ); Wed, 1 Dec 2010 20:21:55 -0500 Received: from smtp-out.google.com ([216.239.44.51]:52185 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753376Ab0LBBVx (ORCPT ); Wed, 1 Dec 2010 20:21:53 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=date:from:x-x-sender:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type; b=SZfPYt2eUcA7LxiLmBXWuOkwz8lwAya/isnzvei8Ln7tJfzTgkZAl4RHj5T4FFzcqP 63kFmZOEZ8ZOKcTZdNGw== Date: Wed, 1 Dec 2010 17:21:48 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Shaohui Zheng cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, lethal@linux-sh.org, Andi Kleen , dave@linux.vnet.ibm.com, Greg KH , Haicheng Li Subject: Re: [8/8, v6] NUMA Hotplug Emulator: implement debugfs interface for memory probe In-Reply-To: <20101201234514.GA13509@shaohui> Message-ID: References: <20101130071324.908098411@intel.com> <20101130071437.461969179@intel.com> <20101201234514.GA13509@shaohui> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1926 Lines: 41 On Thu, 2 Dec 2010, Shaohui Zheng wrote: > > > From: Shaohui Zheng > > > > > > Implement a debugfs inteface /sys/kernel/debug/mem_hotplug/probe for meomory hotplug > > > emulation. it accepts the same parameters like > > > /sys/devices/system/memory/probe. > > > > > > > NACK, we don't need two interfaces to do the same thing. > > You may not know the background, the sysfs memory/probe interface is a general > interface. Even through we have a debugfs interface, we should still keep it. > > For test purpose, the sysfs is enough, according to the comments from Greg & Dave, > we create the debugfs interface. > I doubt either Greg or Dave suggested adding duplicate interfaces for the same functionality. The difference is that we needed to add the add_node interface in a new mem_hotplug debugfs directory because it's only useful for debugging kernel code and, thus, doesn't really have an appropriate place in sysfs. Nobody is going to use add_node unless they lack hotpluggable memory sections in their SRAT and want to debug the memory hotplug callers. For example, I already wrote all of this node hotplug emulation stuff when I wrote the node hotplug support for SLAB. Memory hotplug, however, does serve a non-debugging function and is appropriate in sysfs since this is how people hotplug memory. It's an ABI that we can't simply remove without deprecation over a substantial period of time and in this case it doesn't seem to have a clear advantage. We need not add special emulation support for something that is already possible for real systems, so adding a duplicate interface in debugfs is inappropriate. -- 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/