From: Haicheng Li Subject: Re: [RFC,5/7] NUMA hotplug emulator Date: Mon, 17 May 2010 10:42:17 +0800 Message-ID: <4BF0AD09.80404__36732.2461017922$1274109419$gmane$org@linux.intel.com> References: <20100513115625.GF2169@shaohui> <20100507141142.GA8696@ucw.cz> <20100516174502.GI2418@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20100516174502.GI2418@linux.vnet.ibm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: paulmck@linux.vnet.ibm.com Cc: Christoph Lameter , shaohui.zheng@linux.intel.com, James Bottomley , linux-mm@kvack.org, "H. Peter Anvin" , Stephen Rothwell , Andi Kleen , x86@kernel.org, linux-acpi@vger.kernel.org, Ingo Molnar , David Rientjes , linux-pm@lists.linux-foundation.org, Len Brown , Hidetoshi Seto , Alex Chiang , Mel Gorman , Thomas Gleixner , Yinghai Lu , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Hugh Dickins , Venkatesh Pallipadi List-Id: linux-pm@vger.kernel.org Paul E. McKenney wrote: > On Fri, May 07, 2010 at 04:11:42PM +0200, Pavel Machek wrote: >> Hi! >> >>> hotplug emulator: Abstract cpu register functions >>> >>> Abstract function arch_register_cpu and register_cpu, move the implementation >>> details to a sub function with prefix "__". >>> >>> each of the sub function has an extra parameter nid, it can be used to register >>> CPU under a fake NUMA node, it is a reserved interface for cpu hotplug emulation >>> (CPU PROBE/RELEASE) in x86. >> I don't get it. CPU hotplug can already be tested using echo 0/1 > >> online, and that works on 386. How is this different? "echo 0/1 > online" is logical cpu online/offline. The emulator intends to emulate physical add/remove of cpus. They cover different code path. You can get details of the terms via $KERN_SRC/Documentation/cpu-hotplug.txt. >> It seems to add some numa magic. Why is it important? In real world, numa affinity info of the cpus is required for physical cpu hotadd/remove , which finally affects related data structures and code path. Emulator need the ability to emulate it. > My guess is that he wants to test the software surrounding NUMA on a > non-NUMA (or different-NUMA) machine, perhaps in order to shake out bugs > before the corresponding hardware is available. This is one of the purposes. Auto tests and debugging all can get benefits from such emulation. -haicheng