* Re: [8/8, v6] NUMA Hotplug Emulator: implement debugfs interface for memory probe
[not found] <A24AE1FFE7AEC5489F83450EE98351BF288D88D224@shsmsx502.ccr.corp.intel.com>
@ 2010-12-02 0:27 ` Shaohui Zheng
2010-12-02 2:13 ` David Rientjes
0 siblings, 1 reply; 9+ messages in thread
From: Shaohui Zheng @ 2010-12-02 0:27 UTC (permalink / raw)
To: shaohui.zheng@linux.intel.com, David Rientjes
Cc: akpm, linux-mm, linux-kernel, haicheng.li, lethal, ak, dave,
gregkh, Haicheng Li
>
> 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.
so we should still keep the sysfs memory/probe interface without any modifications,
but for the debugfs mem_hotplug/probe interface, we can add the memory region
to a desired node. It is an extention for the sysfs memory/probe interface, it can
be used for memory hotplug emulation. Do I understand it correctly?
--
Thanks & Regards,
Shaohui
--
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 policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [8/8, v6] NUMA Hotplug Emulator: implement debugfs interface for memory probe
2010-12-02 0:27 ` [8/8, v6] NUMA Hotplug Emulator: implement debugfs interface for memory probe Shaohui Zheng
@ 2010-12-02 2:13 ` David Rientjes
2010-12-02 2:35 ` Zheng, Shaohui
0 siblings, 1 reply; 9+ messages in thread
From: David Rientjes @ 2010-12-02 2:13 UTC (permalink / raw)
To: Shaohui Zheng
Cc: Andrew Morton, linux-mm, linux-kernel, lethal, Andi Kleen,
Dave Hansen, Greg KH, Haicheng Li
On Thu, 2 Dec 2010, Shaohui Zheng wrote:
> so we should still keep the sysfs memory/probe interface without any modifications,
> but for the debugfs mem_hotplug/probe interface, we can add the memory region
> to a desired node.
This feature would be distinct from the add_node interface already
provided: instead of hotplugging a new node to test the memory hotplug
callbacks, this new interface would only be hotadding new memory to a node
other than the one it has physical affinity with. For that support, I'd
suggest new probe files in debugfs for each online node:
/sys/kernel/debug/mem_hotplug/add_node (already exists)
/sys/kernel/debug/mem_hotplug/node0/add_memory
/sys/kernel/debug/mem_hotplug/node1/add_memory
...
and then you can offline and remove that memory with the existing hotplug
support (CONFIG_MEMORY_HOTPLUG and CONFIG_MEMORY_HOTREMOVE, respectively).
--
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 policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [8/8, v6] NUMA Hotplug Emulator: implement debugfs interface for memory probe
2010-12-02 2:13 ` David Rientjes
@ 2010-12-02 2:35 ` Zheng, Shaohui
2010-12-02 23:34 ` David Rientjes
0 siblings, 1 reply; 9+ messages in thread
From: Zheng, Shaohui @ 2010-12-02 2:35 UTC (permalink / raw)
To: David Rientjes
Cc: Andrew Morton, linux-mm@kvack.org, linux-kernel@vger.kernel.org,
lethal@linux-sh.org, Andi Kleen, Dave Hansen, Greg KH,
Li, Haicheng, shaohui.zheng@linux.intel.com
Why should we add so many interfaces for memory hotplug emulation? If so, we should create both sysfs and debugfs
entries for an online node, we are trying to add redundant code logic.
We need not make a simple thing such complicated, Simple is beautiful, I'd prefer to rename the mem_hotplug/probe
interface as mem_hotplug/add_memory.
/sys/kernel/debug/mem_hotplug/add_node (already exists)
/sys/kernel/debug/mem_hotplug/add_memory (rename probe as add_memory)
Thanks & Regards,
Shaohui
-----Original Message-----
From: David Rientjes [mailto:rientjes@google.com]
Sent: Thursday, December 02, 2010 10:13 AM
To: Zheng, Shaohui
Cc: Andrew Morton; linux-mm@kvack.org; linux-kernel@vger.kernel.org; lethal@linux-sh.org; Andi Kleen; Dave Hansen; Greg KH; Li, Haicheng
Subject: Re: [8/8, v6] NUMA Hotplug Emulator: implement debugfs interface for memory probe
On Thu, 2 Dec 2010, Shaohui Zheng wrote:
> so we should still keep the sysfs memory/probe interface without any modifications,
> but for the debugfs mem_hotplug/probe interface, we can add the memory region
> to a desired node.
This feature would be distinct from the add_node interface already
provided: instead of hotplugging a new node to test the memory hotplug
callbacks, this new interface would only be hotadding new memory to a node
other than the one it has physical affinity with. For that support, I'd
suggest new probe files in debugfs for each online node:
/sys/kernel/debug/mem_hotplug/add_node (already exists)
/sys/kernel/debug/mem_hotplug/node0/add_memory
/sys/kernel/debug/mem_hotplug/node1/add_memory
...
and then you can offline and remove that memory with the existing hotplug
support (CONFIG_MEMORY_HOTPLUG and CONFIG_MEMORY_HOTREMOVE, respectively).
--
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 policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [8/8, v6] NUMA Hotplug Emulator: implement debugfs interface for memory probe
2010-12-02 2:35 ` Zheng, Shaohui
@ 2010-12-02 23:34 ` David Rientjes
2010-12-06 1:22 ` Zheng, Shaohui
0 siblings, 1 reply; 9+ messages in thread
From: David Rientjes @ 2010-12-02 23:34 UTC (permalink / raw)
To: Zheng, Shaohui
Cc: Andrew Morton, linux-mm@kvack.org, linux-kernel@vger.kernel.org,
lethal@linux-sh.org, Andi Kleen, Dave Hansen, Greg KH,
Li, Haicheng
On Thu, 2 Dec 2010, Zheng, Shaohui wrote:
> Why should we add so many interfaces for memory hotplug emulation?
Because they are functionally different from real memory hotplug and we
want to support different configurations such as mapping memory to a
different node id or onlining physical nodes that don't exist.
They are in debugfs because the emulation, unlike real memory hotplug, is
used only for testing and debugging.
> If so, we should create both sysfs and debugfs
> entries for an online node, we are trying to add redundant code logic.
>
We do not need sysfs triggers for onlining a node, that already happens
automatically if the memory that is being onlined has a hotpluggable node
entry in the SRAT that has an offline node id.
> We need not make a simple thing such complicated, Simple is beautiful, I'd prefer to rename the mem_hotplug/probe
> interface as mem_hotplug/add_memory.
>
> /sys/kernel/debug/mem_hotplug/add_node (already exists)
> /sys/kernel/debug/mem_hotplug/add_memory (rename probe as add_memory)
>
No, add_memory would then require these bizarre lines that you've been
parsing like
echo 'physical_addr=0x80000000 node_id=3' > /sys/kernel/debug/mem_hotplug/add_memory
which is unnecessary if you introduce my proposal for per-node debugfs
directories similar to that under /sys/devices/system/node that is
extendable later if we add additional per-node triggers under
CONFIG_DEBUG_FS.
Adding /sys/kernel/debug/mem_hotplug/node2/add_memory that you write a
physical address to is a much more robust, simple, and extendable
interface.
--
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 policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [8/8, v6] NUMA Hotplug Emulator: implement debugfs interface for memory probe
2010-12-02 23:34 ` David Rientjes
@ 2010-12-06 1:22 ` Zheng, Shaohui
0 siblings, 0 replies; 9+ messages in thread
From: Zheng, Shaohui @ 2010-12-06 1:22 UTC (permalink / raw)
To: David Rientjes
Cc: Andrew Morton, linux-mm@kvack.org, linux-kernel@vger.kernel.org,
lethal@linux-sh.org, Andi Kleen, Dave Hansen, Greg KH,
Li, Haicheng, shaohui.zheng@linux.intel.com
After introduce the per-node interface, the following directive can be avoided.
echo '0x80000000,3' > /sys/kernel/debug/mem_hotplug/add_memory
echo 'physical_addr=0x80000000 node_id=3' > /sys/kernel/debug/mem_hotplug/add_memory
I already implemented a draft in another thread, and waiting for comments, thanks for the proposal.
Thanks & Regards,
Shaohui
-----Original Message-----
From: David Rientjes [mailto:rientjes@google.com]
Sent: Friday, December 03, 2010 7:34 AM
To: Zheng, Shaohui
Cc: Andrew Morton; linux-mm@kvack.org; linux-kernel@vger.kernel.org; lethal@linux-sh.org; Andi Kleen; Dave Hansen; Greg KH; Li, Haicheng
Subject: RE: [8/8, v6] NUMA Hotplug Emulator: implement debugfs interface for memory probe
On Thu, 2 Dec 2010, Zheng, Shaohui wrote:
> Why should we add so many interfaces for memory hotplug emulation?
Because they are functionally different from real memory hotplug and we
want to support different configurations such as mapping memory to a
different node id or onlining physical nodes that don't exist.
They are in debugfs because the emulation, unlike real memory hotplug, is
used only for testing and debugging.
> If so, we should create both sysfs and debugfs
> entries for an online node, we are trying to add redundant code logic.
>
We do not need sysfs triggers for onlining a node, that already happens
automatically if the memory that is being onlined has a hotpluggable node
entry in the SRAT that has an offline node id.
> We need not make a simple thing such complicated, Simple is beautiful, I'd prefer to rename the mem_hotplug/probe
> interface as mem_hotplug/add_memory.
>
> /sys/kernel/debug/mem_hotplug/add_node (already exists)
> /sys/kernel/debug/mem_hotplug/add_memory (rename probe as add_memory)
>
No, add_memory would then require these bizarre lines that you've been
parsing like
echo 'physical_addr=0x80000000 node_id=3' > /sys/kernel/debug/mem_hotplug/add_memory
which is unnecessary if you introduce my proposal for per-node debugfs
directories similar to that under /sys/devices/system/node that is
extendable later if we add additional per-node triggers under
CONFIG_DEBUG_FS.
Adding /sys/kernel/debug/mem_hotplug/node2/add_memory that you write a
physical address to is a much more robust, simple, and extendable
interface.
--
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 policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [0/8, v6] NUMA Hotplug Emulator(v6) - Introduction & Feedbacks
@ 2010-11-30 7:13 shaohui.zheng
2010-11-30 7:13 ` [8/8, v6] NUMA Hotplug Emulator: implement debugfs interface for memory probe shaohui.zheng
0 siblings, 1 reply; 9+ messages in thread
From: shaohui.zheng @ 2010-11-30 7:13 UTC (permalink / raw)
To: akpm, linux-mm
Cc: linux-kernel, haicheng.li, lethal, ak, shaohui.zheng, rientjes,
dave, gregkh
* PATCHSET INTRODUCTION
patch 1: Documentation.
patch 2: Adds a numa=possible=<N> command line option to set an additional N nodes
as being possible for memory hotplug.
patch 3: Add node hotplug emulation, introduce debugfs node/add_node interface
patch 4: Abstract cpu register functions, make these interfaces friendly for cpu
hotplug emulation
patch 5: Support cpu probe/release in x86, it provides 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: Implement memory probe interface with debugfs
* FEEDBACKDS & RESPONSES
v5:
David: Suggests to use a flexible method to to do node hotplug emulation. After
review our 2 versions emulator implemetations, David provides a better solution
to solve both the flexibility and memory wasting issue.
Add numa=possible=<N> command line option, provide sysfs inteface
/sys/devices/system/node/add_node interface, and move the inteface to debugfs
/sys/kernel/debug/hotplug/add_node after hearing the voice from community.
Greg KH: move the interface from hotplug/add_node to node/add_node
Response: Accept David's node=possible=<n> command line options. After talking
with David, he agreed to add his patch to our patchset, thanks David's solution(patch 1).
David's original interface /sys/kernel/debug/hotplug/add_node is not so clear for
node hotplug emulation, we accept Greg's suggestion, move the interface to ndoe/add_node
(patch 2)
Dave Hansen: For memory hotplug, Dave reminds Greg KH's advice, suggest us to use configfs replace
sysfs. After Dave knows that it is just for test purpose, Dave thinks debugfs should
be the best.
Response: memory probe sysfs interface already exists, I'd like to still keep it, and extend it
to support memory add on a specified node(patch 6).
We accepts Dave's suggestion, implement memory probe interface with debugfs(patch 7).
Randy Dunlap: Correct many grammatical errors in our documentation(patch 8).
Response: Thanks for Randy's careful review, we already correct them.
v6:
Greg KH: Suggest to use interface mem_hotplug/add_node
David: Agree with Greg's suggestion
Response: We move the interface from node/add_node to mem_hotplug/add_node, and we also move
memory/probe interface to mem_hotplug/probe since both are related to memory hotplug.
Kletnieks Valdis: suggest to renumber the patch serie, and move patch 8/8 to patch 1/8.
Response: Move patch 8/8 to patch 1/8, and we will include the full description in 0/8 when
we send patches 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: node/CPU/memory hotplug
emulation.
1) Node hotplug emulation:
Adds a numa=possible=<N> command line option to set an additional N nodes as
being possible for memory hotplug. This set of possible nodes control
nr_node_ids and the sizes of several dynamically allocated node arrays.
This allows memory hotplug to create new nodes for newly added memory
rather than binding it to existing nodes.
For emulation on x86, it would be possible to set aside memory for hotplugged
nodes (say, anything above 2G) and to add an additional four nodes as being
possible on boot with
mem=2G numa=possible=4
and then creating a new 128M node at runtime:
# echo 128M@0x80000000 > /sys/kernel/debug/node/add_node
On node 1 totalpages: 0
init_memory_mapping: 0000000080000000-0000000088000000
0080000000 - 0088000000 page 2M
Once the new node has been added, its memory can be onlined. If this
memory represents memory section 16, for example:
# echo online > /sys/devices/system/memory/memory16/state
Built 2 zonelists in Node order, mobility grouping on. Total pages: 514846
Policy zone: Normal
[ The memory section(s) mapped to a particular node are visible via
/sys/devices/system/node/node1, in this example. ]
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, David Rientjes and
Yongkang You
--
Thanks & Regards,
Shaohui
--
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 policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [8/8, v6] NUMA Hotplug Emulator: implement debugfs interface for memory probe
2010-11-30 7:13 [0/8, v6] NUMA Hotplug Emulator(v6) - Introduction & Feedbacks shaohui.zheng
@ 2010-11-30 7:13 ` shaohui.zheng
2010-12-02 0:57 ` David Rientjes
0 siblings, 1 reply; 9+ messages in thread
From: shaohui.zheng @ 2010-11-30 7:13 UTC (permalink / raw)
To: akpm, linux-mm
Cc: linux-kernel, haicheng.li, lethal, ak, shaohui.zheng, rientjes,
dave, gregkh, Shaohui Zheng, Haicheng Li
[-- Attachment #1: 008-hotplug-emulator-implement-memory-probe-debugfs-interface.patch --]
[-- Type: text/plain, Size: 4059 bytes --]
From: Shaohui Zheng <shaohui.zheng@intel.com>
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.
Document the interface usage to file Documentation/memory-hotplug.txt.
CC: Dave Hansen <dave@linux.vnet.ibm.com>
Signed-off-by: Shaohui Zheng <shaohui.zheng@intel.com>
Signed-off-by: Haicheng Li <haicheng.li@intel.com>
--
Index: linux-hpe4/mm/memory_hotplug.c
===================================================================
--- linux-hpe4.orig/mm/memory_hotplug.c 2010-11-30 14:15:23.587622002 +0800
+++ linux-hpe4/mm/memory_hotplug.c 2010-11-30 14:16:45.447622001 +0800
@@ -983,4 +983,35 @@
}
module_init(node_debug_init);
+
+#ifdef CONFIG_ARCH_MEMORY_PROBE
+
+static ssize_t debug_memory_probe_store(struct file *file, const char __user *buf,
+ size_t count, loff_t *ppos)
+{
+ return parse_memory_probe_store(buf, count);
+}
+
+static const struct file_operations memory_probe_file_ops = {
+ .write = debug_memory_probe_store,
+ .llseek = generic_file_llseek,
+};
+
+static int __init memory_debug_init(void)
+{
+ if (!memhp_debug_root)
+ memhp_debug_root = debugfs_create_dir("mem_hotplug", NULL);
+ if (!memhp_debug_root)
+ return -ENOMEM;
+
+ if (!debugfs_create_file("probe", S_IWUSR, memhp_debug_root,
+ NULL, &memory_probe_file_ops))
+ return -ENOMEM;
+
+ return 0;
+}
+
+module_init(memory_debug_init);
+
+#endif /* CONFIG_ARCH_MEMORY_PROBE */
#endif /* CONFIG_DEBUG_FS */
Index: linux-hpe4/Documentation/memory-hotplug.txt
===================================================================
--- linux-hpe4.orig/Documentation/memory-hotplug.txt 2010-11-30 14:15:23.587622002 +0800
+++ linux-hpe4/Documentation/memory-hotplug.txt 2010-11-30 14:40:27.267622000 +0800
@@ -198,23 +198,41 @@
In some environments, especially virtualized environment, firmware will not
notify memory hotplug event to the kernel. For such environment, "probe"
interface is supported. This interface depends on CONFIG_ARCH_MEMORY_PROBE.
+It can be also used for physical memory hotplug emulation.
-Now, CONFIG_ARCH_MEMORY_PROBE is supported only by powerpc but it does not
-contain highly architecture codes. Please add config if you need "probe"
+Now, CONFIG_ARCH_MEMORY_PROBE is supported by powerpc and x86_64, but it does
+not contain highly architecture codes. Please add config if you need "probe"
interface.
-Probe interface is located at
-/sys/devices/system/memory/probe
+We have both sysfs and debugfs interface for memory probe. They are located at
+/sys/devices/system/memory/probe (sysfs) and /sys/kernel/debug/mem_hotplug/probe
+(debugfs), We can try any of them, they accpet the same parameters.
You can tell the physical address of new memory to the kernel by
-% echo start_address_of_new_memory > /sys/devices/system/memory/probe
+% echo start_address_of_new_memory > memory/probe
Then, [start_address_of_new_memory, start_address_of_new_memory + section_size)
memory range is hot-added. In this case, hotplug script is not called (in
current implementation). You'll have to online memory by yourself.
Please see "How to online memory" in this text.
+The probe interface can accept flexible parameters, for example:
+
+Add a memory section(128M) to node 3(boots with mem=1024m)
+
+ echo 0x40000000,3 > memory/probe
+
+And more we make it friendly, it is possible to add memory to do
+
+ echo 3g > memory/probe
+ echo 1024m,3 > memory/probe
+
+Another format suggested by Dave Hansen:
+
+ echo physical_address=0x40000000 numa_node=3 > memory/probe
+
+You can also use mem_hotplug/probe(debugfs) interface in the above examples.
4.3 Node hotplug emulation
------------
--
Thanks & Regards,
Shaohui
--
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 policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [8/8, v6] NUMA Hotplug Emulator: implement debugfs interface for memory probe
2010-11-30 7:13 ` [8/8, v6] NUMA Hotplug Emulator: implement debugfs interface for memory probe shaohui.zheng
@ 2010-12-02 0:57 ` David Rientjes
2010-12-01 23:45 ` Shaohui Zheng
0 siblings, 1 reply; 9+ messages in thread
From: David Rientjes @ 2010-12-02 0:57 UTC (permalink / raw)
To: Shaohui Zheng
Cc: akpm, linux-mm, linux-kernel, haicheng.li, lethal, ak,
shaohui.zheng, dave, gregkh, Haicheng Li
On Tue, 30 Nov 2010, shaohui.zheng@intel.com wrote:
> From: Shaohui Zheng <shaohui.zheng@intel.com>
>
> 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.
--
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 policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [8/8, v6] NUMA Hotplug Emulator: implement debugfs interface for memory probe
2010-12-02 0:57 ` David Rientjes
@ 2010-12-01 23:45 ` Shaohui Zheng
2010-12-02 1:21 ` David Rientjes
0 siblings, 1 reply; 9+ messages in thread
From: Shaohui Zheng @ 2010-12-01 23:45 UTC (permalink / raw)
To: David Rientjes
Cc: akpm, linux-mm, linux-kernel, haicheng.li, lethal, ak,
shaohui.zheng, dave, gregkh, Haicheng Li
On Wed, Dec 01, 2010 at 04:57:35PM -0800, David Rientjes wrote:
> On Tue, 30 Nov 2010, shaohui.zheng@intel.com wrote:
>
> > From: Shaohui Zheng <shaohui.zheng@intel.com>
> >
> > 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.
--
Thanks & Regards,
Shaohui
--
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 policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [8/8, v6] NUMA Hotplug Emulator: implement debugfs interface for memory probe
2010-12-01 23:45 ` Shaohui Zheng
@ 2010-12-02 1:21 ` David Rientjes
0 siblings, 0 replies; 9+ messages in thread
From: David Rientjes @ 2010-12-02 1:21 UTC (permalink / raw)
To: Shaohui Zheng
Cc: Andrew Morton, linux-mm, linux-kernel, lethal, Andi Kleen, dave,
Greg KH, Haicheng Li
On Thu, 2 Dec 2010, Shaohui Zheng wrote:
> > > From: Shaohui Zheng <shaohui.zheng@intel.com>
> > >
> > > 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, 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 policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-12-06 1:23 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <A24AE1FFE7AEC5489F83450EE98351BF288D88D224@shsmsx502.ccr.corp.intel.com>
2010-12-02 0:27 ` [8/8, v6] NUMA Hotplug Emulator: implement debugfs interface for memory probe Shaohui Zheng
2010-12-02 2:13 ` David Rientjes
2010-12-02 2:35 ` Zheng, Shaohui
2010-12-02 23:34 ` David Rientjes
2010-12-06 1:22 ` Zheng, Shaohui
2010-11-30 7:13 [0/8, v6] NUMA Hotplug Emulator(v6) - Introduction & Feedbacks shaohui.zheng
2010-11-30 7:13 ` [8/8, v6] NUMA Hotplug Emulator: implement debugfs interface for memory probe shaohui.zheng
2010-12-02 0:57 ` David Rientjes
2010-12-01 23:45 ` Shaohui Zheng
2010-12-02 1:21 ` David Rientjes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).