All of lore.kernel.org
 help / color / mirror / Atom feed
* [0/8,v3] NUMA Hotplug Emulator - Introduction & Feedbacks
@ 2010-11-17  2:07 ` shaohui.zheng
  0 siblings, 0 replies; 139+ messages in thread
From: shaohui.zheng @ 2010-11-17  2:07 UTC (permalink / raw)
  To: akpm, linux-mm; +Cc: linux-kernel, haicheng.li, lethal, ak, shaohui.zheng

* PATCHSET INTRODUCTION

patch 1: Add function to hide memory region via e820 table. Then emulator will
	     use these memory regions to fake offlined numa nodes.
patch 2: Infrastructure of NUMA hotplug emulation, introduce "hide node".
patch 3: Provide an userland interface to hotplug-add fake offlined nodes.
patch 4: Abstract cpu register functions, make these interface friend for cpu
		 hotplug emulation
patch 5: Support cpu probe/release in x86, it provide a software method to hot
		 add/remove cpu with sysfs interface.
patch 6: Fake CPU socket with logical CPU on x86, to prevent the scheduling
		 domain to build the incorrect hierarchy.
patch 7: extend memory probe interface to support NUMA, we can add the memory to
		 a specified node with the interface.
patch 8: Documentations

* FEEDBACKS & RESPONSES

1) Patch 0
Balbir & Greg: Suggest to use tool git/quilt to manage/send the patchset.
Response: Thanks for the recommendation, With help from Fengguang, I get quilt
		  working, it is a great tool.

2) Patch 2
Jaswinder Singh: if (hidden_num) is not required in patch 2
Response: good catching, it is removed in v2.


3) Patch 3
Dave Hansen: Suggest to create a dedicated sysfs file for each possible node.
Greg: 	  How big would this "list" be?  What will it look like exactly?
Haicheng: It should follow "one value per file". It intends to show acceptable
		  parameters.

		  For example, if we have 4 fake offlined nodes, like node 2-5, then:
			   $ cat /sys/devices/system/node/probe
				 2-5

		  Then user hotadds node3 to system:
			   $ echo 3 > /sys/devices/system/node/probe
			   $ cat /sys/devices/system/node/probe
				 2,4-5

Greg:   As you are trying to add a new sysfs file, please create the matching
		Documentation/ABI/ file as well.
Response: We miss it, and we already add it in v2.

Patch 4 & 5: 
Paul Mundt: This looks like an incredibly painful interface. How about scrapping all
of this _emu() mess and just reworking the register_cpu() interface?
Response: accept Paul's suggestion, and remove the cpu _emu functions.

Patch 7: 
Dave Hansen: If we're going to put multiple values into the file now and
		 add to the ABI, can we be more explicit about it?
		echo "physical_address=0x40000000 numa_node=3" > memory/probe
Response: Dave's new interface was accpeted, and more we still keep the old 
	      format for compatibility. We documented the these interfaces into
		  Documentation/ABI in v2.
Greg: 	suggest to use configfs replace for the memory probe interface
Andi: 	This is a debugging interface. It doesn't need to have the
	  	most pretty interface in the world, because it will be only used for
	  	QA by a few people. it's just a QA interface, not the next generation
		of POSIX.
Response: We still keep it as sysfs interface since node/cpu/memory probe interface
		  are all in sysfs, we can create another group of patches to support
		  configfs if we have this strong requirement in future.


* WHAT IS HOTPLUG EMULATOR 

NUMA hotplug emulator is collectively named for the hotplug emulation
it is able to emulate NUMA Node Hotplug thru a pure software way. It
intends to help people easily debug and test node/cpu/memory hotplug
related stuff on a none-numa-hotplug-support machine, even an UMA machine.

The emulator provides mechanism to emulate the process of physcial cpu/mem
hotadd, it provides possibility to debug CPU and memory hotplug on the machines
without NUMA support for kenrel developers. It offers an interface for cpu
and memory hotplug test purpose.

* WHY DO WE USE HOTPLUG EMULATOR

We are focusing on the hotplug emualation for a few months. The emualor helps
 team to reproduce all the major hotplug bugs. It plays an important role to
the hotplug code quality assuirance. Because of the hotplug emulator, we already
move most of the debug working to virtual evironment.

* Principles & Usages 

NUMA hotplug emulator include 3 different parts, We add a menu item to the
menuconfig to enable/disable them.

1) Node hotplug emulation:

The emulator firstly hides RAM via E820 table, and then it can
fake offlined nodes with the hidden RAM.

After system bootup, user is able to hotplug-add these offlined
nodes, which is just similar to a real hotplug hardware behavior.

Using boot option "numa=hide=N*size" to fake offlined nodes:
	- N is the number of hidden nodes
	- size is the memory size (in MB) per hidden node.

There is a sysfs entry "probe" under /sys/devices/system/node/ for user
to hotplug the fake offlined nodes:

 - to show all fake offlined nodes:
    $ cat /sys/devices/system/node/probe

 - to hotadd a fake offlined node, e.g. nodeid is N:
    $ echo N > /sys/devices/system/node/probe

2) CPU hotplug emulation:

The emulator reserve CPUs throu grub parameter, the reserved CPUs can be
hot-add/hot-remove in software method.

When hotplug a CPU with emulator, we are using a logical CPU to emulate the CPU
hotplug process. For the CPU supported SMT, some logical CPUs are in the same
socket, but it may located in different NUMA node after we have emulator.  We
put the logical CPU into a fake CPU socket, and assign it an unique
phys_proc_id. For the fake socket, we put one logical CPU in only.

 - to hide CPUs
	- Using boot option "maxcpus=N" hide CPUs
	  N is the number of initialize CPUs
	- Using boot option "cpu_hpe=on" to enable cpu hotplug emulation
      when cpu_hpe is enabled, the rest CPUs will not be initialized 

 - to hot-add CPU to node
	$ echo nid > cpu/probe

 - to hot-remove CPU
	$ echo nid > cpu/release

3) Memory hotplug emulation:

The emulator reserve memory before OS booting, the reserved memory region
is remove from e820 table, and they can be hot-added via the probe interface,
this interface was extend to support add memory to the specified node, It
maintains backwards compatibility.

The difficulty of Memory Release is well-known, we have no plan for it until now.

 - reserve memory throu grub parameter
 	mem=1024m

 - add a memory section to node 3
    $ echo 0x40000000,3 > memory/probe
	OR
    $ echo 1024m,3 > memory/probe

* ACKNOWLEDGMENT 

hotplug emulator includes a team's efforts, thanks all of them.
They are:
Andi Kleen, Haicheng Li, Shaohui Zheng, Fengguang Wu and Yongkang You

-- 
Thanks & Regards,
Shaohui



^ permalink raw reply	[flat|nested] 139+ messages in thread

end of thread, other threads:[~2010-11-30  0:04 UTC | newest]

Thread overview: 139+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-17  2:07 [0/8,v3] NUMA Hotplug Emulator - Introduction & Feedbacks shaohui.zheng
2010-11-17  2:07 ` shaohui.zheng
2010-11-17  2:08 ` [1/8,v3] NUMA Hotplug Emulator: add function to hide memory region via e820 table shaohui.zheng
2010-11-17  2:08   ` shaohui.zheng
2010-11-17  8:16   ` David Rientjes
2010-11-17  8:16     ` David Rientjes
2010-11-18  9:20     ` Shaohui Zheng
2010-11-18  9:20       ` Shaohui Zheng
2010-11-18 21:16       ` David Rientjes
2010-11-18 21:16         ` David Rientjes
2010-11-19  0:12         ` Shaohui Zheng
2010-11-19  0:12           ` Shaohui Zheng
2010-11-21  0:45           ` David Rientjes
2010-11-21  0:45             ` David Rientjes
2010-11-21 14:00             ` Américo Wang
2010-11-21 14:00               ` Américo Wang
2010-11-21 21:33               ` David Rientjes
2010-11-21 21:33                 ` David Rientjes
2010-11-17  2:08 ` [2/8,v3] NUMA Hotplug Emulator: infrastructure of NUMA hotplug emulation shaohui.zheng
2010-11-17  2:08   ` shaohui.zheng
2010-11-17  8:16   ` David Rientjes
2010-11-17  8:16     ` David Rientjes
2010-11-17  7:51     ` Shaohui Zheng
2010-11-17  7:51       ` Shaohui Zheng
2010-11-17 21:10       ` David Rientjes
2010-11-17 21:10         ` David Rientjes
2010-11-18  4:14         ` Shaohui Zheng
2010-11-18  4:14           ` Shaohui Zheng
2010-11-18  6:27           ` Paul Mundt
2010-11-18  6:27             ` Paul Mundt
2010-11-18  5:27             ` Shaohui Zheng
2010-11-18  5:27               ` Shaohui Zheng
2010-11-18 21:24               ` David Rientjes
2010-11-18 21:24                 ` David Rientjes
2010-11-19  0:32                 ` Shaohui Zheng
2010-11-19  0:32                   ` Shaohui Zheng
2010-11-21  0:48                   ` David Rientjes
2010-11-21  0:48                     ` David Rientjes
2010-11-21  2:28                     ` [patch 1/2] x86: add numa=possible command line option David Rientjes
2010-11-21  2:28                       ` David Rientjes
2010-11-21  2:28                       ` [patch 2/2] mm: add node hotplug emulation David Rientjes
2010-11-21  2:28                         ` David Rientjes
2010-11-21 17:34                         ` Greg KH
2010-11-21 17:34                           ` Greg KH
2010-11-21 21:48                           ` David Rientjes
2010-11-21 21:48                             ` David Rientjes
2010-11-21 23:08                             ` [patch 2/2 v2] " David Rientjes
2010-11-21 23:08                               ` David Rientjes
2010-11-22  0:56                               ` Greg KH
2010-11-22  0:56                                 ` Greg KH
2010-11-28  1:52                                 ` David Rientjes
2010-11-28  1:52                                   ` David Rientjes
2010-11-28  5:17                                   ` Greg KH
2010-11-28  5:17                                     ` Greg KH
2010-11-30  0:04                                     ` David Rientjes
2010-11-30  0:04                                       ` David Rientjes
2010-11-21 14:26                       ` [patch 1/2] x86: add numa=possible command line option Américo Wang
2010-11-21 14:26                         ` Américo Wang
2010-11-21 21:46                         ` David Rientjes
2010-11-21 21:46                           ` David Rientjes
2010-11-22 15:43                           ` Américo Wang
2010-11-22 15:43                             ` Américo Wang
2010-11-21 15:14                     ` [2/8,v3] NUMA Hotplug Emulator: infrastructure of NUMA hotplug emulation Li, Haicheng
2010-11-21 15:14                       ` Li, Haicheng
2010-11-21 21:42                       ` David Rientjes
2010-11-21 21:42                         ` David Rientjes
2010-11-18 21:19           ` David Rientjes
2010-11-18 21:19             ` David Rientjes
2010-11-17  2:08 ` [3/8,v3] NUMA Hotplug Emulator: Userland interface to hotplug-add fake offlined nodes shaohui.zheng
2010-11-17  2:08   ` shaohui.zheng
2010-11-17  8:16   ` David Rientjes
2010-11-17  8:16     ` David Rientjes
2010-11-17  2:08 ` [4/8,v3] NUMA Hotplug Emulator: Abstract cpu register functions shaohui.zheng
2010-11-17  2:08   ` shaohui.zheng
2010-11-17  2:08 ` [5/8,v3] NUMA Hotplug Emulator: support cpu probe/release in x86 shaohui.zheng
2010-11-17  2:08   ` shaohui.zheng
2010-11-21 14:45   ` Américo Wang
2010-11-21 14:45     ` Américo Wang
2010-11-22  0:01     ` Shaohui Zheng
2010-11-22  0:01       ` Shaohui Zheng
2010-11-22 15:51       ` Américo Wang
2010-11-22 15:51         ` Américo Wang
2010-11-22 23:29         ` Shaohui Zheng
2010-11-22 23:29           ` Shaohui Zheng
2010-11-17  2:08 ` [6/8,v3] NUMA Hotplug Emulator: Fake CPU socket with logical CPU on x86 shaohui.zheng
2010-11-17  2:08   ` shaohui.zheng
2010-11-17  2:08 ` [7/8,v3] NUMA Hotplug Emulator: extend memory probe interface to support NUMA shaohui.zheng
2010-11-17  2:08   ` shaohui.zheng
2010-11-17 18:50   ` Dave Hansen
2010-11-17 18:50     ` Dave Hansen
2010-11-17 21:18     ` David Rientjes
2010-11-17 21:18       ` David Rientjes
2010-11-17 21:55       ` Dave Hansen
2010-11-17 21:55         ` Dave Hansen
2010-11-17 22:44         ` David Rientjes
2010-11-17 22:44           ` David Rientjes
2010-11-17 23:00           ` Dave Hansen
2010-11-17 23:00             ` Dave Hansen
2010-11-17 23:17             ` David Rientjes
2010-11-17 23:17               ` David Rientjes
2010-11-18 16:59           ` Aaron Durbin
2010-11-18 16:59             ` Aaron Durbin
2010-11-18  4:48       ` Shaohui Zheng
2010-11-18  4:48         ` Shaohui Zheng
2010-11-18  6:24         ` Paul Mundt
2010-11-18  6:24           ` Paul Mundt
2010-11-18 21:28           ` David Rientjes
2010-11-18 21:28             ` David Rientjes
2010-11-18 21:31         ` David Rientjes
2010-11-18 21:31           ` David Rientjes
2010-11-18  4:36     ` Shaohui Zheng
2010-11-18  4:36       ` Shaohui Zheng
2010-11-19  7:51     ` Shaohui Zheng
2010-11-19 16:36       ` Dave Hansen
2010-11-19 16:36         ` Dave Hansen
2010-11-17  2:08 ` [8/8,v3] NUMA Hotplug Emulator: documentation shaohui.zheng
2010-11-17  2:08   ` shaohui.zheng
2010-11-17 23:06   ` Randy Dunlap
2010-11-17 23:06     ` Randy Dunlap
2010-11-18  2:31     ` Shaohui Zheng
2010-11-18  2:31       ` Shaohui Zheng
2010-11-21 15:03   ` Américo Wang
2010-11-21 15:03     ` Américo Wang
2010-11-21 15:16     ` Li, Haicheng
2010-11-21 15:16       ` Li, Haicheng
2010-11-21 23:33     ` Shaohui Zheng
2010-11-21 23:33       ` Shaohui Zheng
2010-11-22 16:04       ` Américo Wang
2010-11-22 16:04         ` Américo Wang
2010-11-22 23:23         ` Shaohui Zheng
2010-11-22 23:23           ` Shaohui Zheng
2010-11-17  5:22 ` [0/8,v3] NUMA Hotplug Emulator - Introduction & Feedbacks Paul Mundt
2010-11-17  5:22   ` Paul Mundt
2010-11-19  5:54   ` Shaohui Zheng
2010-11-19  5:54     ` Shaohui Zheng
2010-11-17  9:26 ` Yinghai Lu
2010-11-17  9:26   ` Yinghai Lu
2010-11-18  2:03   ` Shaohui Zheng
2010-11-18  2:03     ` Shaohui Zheng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.