Skip to content

(RFC)Memory hotplug for new nodes v.3.

Yasunori Goto linux-ia64 linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest17 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17(RFC) Memory hotplug for new nodes v.3. (Generic code of pgdat alloc)include/linux/memory_hotplug.h mm/memory_hotplug.c+70 -10 replies
2/17(RFC) Memory hotplug for new nodes v.3. (change name old add_memory() to arch_add_memory())arch/i386/mm/init.c arch/ia64/mm/init.c arch/powerpc/mm/mem.c +1 more+6 -80 replies
3/17(RFC) Memory hotplug for new nodes v.3.(get node id at probe memory)arch/powerpc/mm/mem.c arch/x86_64/mm/init.c drivers/base/memory.c +1 more+21 -13 replies
4/17(RFC) Memory hotplug for new nodes v.3. (generic alloc pgdat)include/linux/memory_hotplug.h+50 -02 replies
5/17(RFC) Memory hotplug for new nodes v.3. (generic refresh NODE_DATA())include/linux/memory_hotplug.h+11 -00 replies
6/17(RFC) Memory hotplug for new nodes v.3. (move out pgdat array from mem_data for ia64)arch/ia64/mm/discontig.c+8 -110 replies
7/17(RFC) Memory hotplug for new nodes v.3. (refresh NODE_DATA() for ia64)arch/ia64/Kconfig arch/ia64/mm/discontig.c include/asm-ia64/nodedata.h+32 -50 replies
8/17(RFC) Memory hotplug for new nodes v.3. (allocate pgdat for ia64)arch/ia64/mm/discontig.c+13 -10 replies
9/17(RFC) Memory hotplug for new nodes v.3. (add return code init_currently_empty_zone)include/linux/mmzone.h mm/memory_hotplug.c mm/page_alloc.c+24 -50 replies
10/17(RFC) Memory hotplug for new nodes v.3. (allocate wait table)mm/page_alloc.c+39 -63 replies
11/17(RFC) Memory hotplug for new nodes v.3. (start kswapd)include/linux/swap.h mm/vmscan.c+32 -71 reply
12/17(RFC) Memory hotplug for new nodes v.3. (rebuild zonelists after online pages)mm/memory_hotplug.c mm/page_alloc.c+33 -51 reply
13/17(RFC) Memory hotplug for new nodes v.3. (changes from __init to __meminit)include/linux/bootmem.h mm/page_alloc.c+11 -111 reply
14/17(RFC) Memory hotplug for new nodes v.3.(add start function acpi_memhotplug)drivers/acpi/acpi_memhotplug.c+22 -00 replies
15/17(RFC) Memory hotplug for new nodes v.3.(allow -EEXIST of add_memory)drivers/acpi/acpi_memhotplug.c+10 -10 replies
16/17(RFC) Memory hotplug for new nodes v.3. (get node id from acpi's handle)drivers/acpi/acpi_memhotplug.c drivers/acpi/numa.c include/linux/acpi.h+24 -20 replies
17/17(RFC) Memory hotplug for new nodes v.3. (arch_register_node() for ia64)arch/ia64/kernel/topology.c include/asm-ia64/numa.h+18 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH: 000/017] (RFC)Memory hotplug for new nodes v.3.

Hello.

I'll post newest patches for memory hotadd with pgdat allocation as V3. There are many changes to make more common code.

This may be too many patches, but I would like to show total feature of this code now.

This patches are for 2.6.16-rc5-mm3.
I tested these patch on just Tiger4(ia64) with emulation now. But, I'll test them for x86-64 too after this post.

Please comment.

---------------------------------------

This is memory hotadd code when new node is added. In this patch, pgdat is allocated when new node is comming. To initialize pgdat and zones, a set of patches are necessary.
- to allcate and initialize pgdat, zone, zonelist.
- to make new kswapd
- to initialize node_data[] array (ia64)
- to register sysfs file for new node.
- to call memory_hotplug code from acpi container driver.

Note:
- kzalloc is used for pgdat allocation in this version.
So, even if pgdat is allocated, it will be allocated on the other node. This is only to simplify patches a bit. :-P

-----------------------------
Followings are updates.

Updates from V2 to V3.
- update for 2.6.16-rc5-mm3.
- The caller function of pgdat allcation and so on become common code.
- Passing node id at add_memory().
- build_zonelists() is called after that pages are onlined.
- Updating NODE_DATA() for ia64 become simple and become common code between booting and hotadd.
(But other consideration will be necessary for hot-remove.)
- kswapd is called by kthread_run().
- finding node id by acpi use handle of its memory device. -

Updates from V1 to V2.
- update for 2.6.16-rc5-mm2.
- not only ia64, This is tested on x86_64 with NUMA emulation too. :-)
- wait_table_size() allcation is changed.
- Take max size as much as possible.
- Change using GFP_ATOMIC. It is inside of zone_init_lock. (Warining message of might_sleep() is very well.)
- stop_machine_run(build_zonelists) is move to outside of lock.
- pgdat_insert() is moved to generic code to be used by x86_64.
- add decision of ZONE_DMA32 or ZONE_NORMAL to x86_64's add_memory().
- Make a separated patch to change from __init to __meminit.
- Fix some typo

Signature · 1 line
Yasunori Goto