Skip to content

Memory hotplug for new nodes v.4.

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 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17Memory hotplug for new nodes v.4.(Generic code of pgdat alloc)include/linux/memory_hotplug.h mm/memory_hotplug.c+70 -10 replies
2/17Memory hotplug for new nodes v.4.(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 -87 replies
3/17Memory hotplug for new nodes v.4.(get node id at probe memory)arch/powerpc/mm/mem.c drivers/base/memory.c include/linux/memory_hotplug.h+16 -11 reply
4/17Memory hotplug for new nodes v.4.(generic alloc pgdat)include/linux/memory_hotplug.h+50 -00 replies
5/17Memory hotplug for new nodes v.4.(generic refresh NODE_DATA())include/linux/memory_hotplug.h+12 -00 replies
6/17Memory hotplug for new nodes v.4.(move out pgdat array from mem_data for ia64)arch/ia64/mm/discontig.c+8 -110 replies
7/17Memory hotplug for new nodes v.4.(refresh NODE_DATA() for ia64)arch/ia64/Kconfig arch/ia64/mm/discontig.c include/asm-ia64/nodedata.h+35 -50 replies
8/17Memory hotplug for new nodes v.4.(allocate pgdat for ia64)arch/ia64/mm/discontig.c+14 -20 replies
9/17Memory hotplug for new nodes v.4.(add return code init_currently_empty_zone)include/linux/mmzone.h mm/memory_hotplug.c mm/page_alloc.c+24 -51 reply
10/17Memory hotplug for new nodes v.4.(allocate wait table)mm/page_alloc.c+45 -62 replies
11/17Memory hotplug for new nodes v.4.(start kswapd)include/linux/swap.h mm/vmscan.c+31 -91 reply
12/17Memory hotplug for new nodes v.4.(rebuild zonelists after online pages)mm/memory_hotplug.c mm/page_alloc.c+33 -51 reply
13/17Memory hotplug for new nodes v.4.(changes from __init to __meminit)include/linux/bootmem.h mm/page_alloc.c+11 -110 replies
14/17Memory hotplug for new nodes v.4.(add start function acpi_memhotplug)drivers/acpi/acpi_memhotplug.c+22 -00 replies
15/17Memory hotplug for new nodes v.4.(avoid calling add_memory() for already exist memory)drivers/acpi/acpi_memhotplug.c+10 -00 replies
16/17Memory hotplug for new nodes v.4.(get node id from acpi's handle)drivers/acpi/acpi_memhotplug.c drivers/acpi/numa.c include/linux/acpi.h+24 -20 replies
17/17Memory hotplug for new nodes v.4.(arch_register_node() for ia64)arch/ia64/kernel/topology.c include/linux/node.h+17 -04 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]Memory hotplug for new nodes v.4.

Hello.

I'll post newest patches for memory hotadd with pgdat allocation as V4. This includes some of small fixes
- Fix compile errors on config HOTADD /NO HOTADD, NUMA/non NUMA, etc.
- Add/update some comments.
- etc.

This patches are for 2.6.16-rc6-mm1.
I tested these patch on just Tiger4(ia64) with emulation now. Unfortunately, x86-64 box which I can use has been busy in this week. So, I couldn't make/test patch for it yet. :-(
But, probably, remain x86-64's issue is just making arch_register_node() to create sysfs file for new node like 17th patch.
When I can use it again, I'll make and test it.

Andrew-san.
Please apply.

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

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 which receive ACPI's notification from firmware.

Ia64 big NUMA box needs this feature. I heard that x86-64 needs this too. Powerpc might use some of this code.

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 V3 to V4.
- update for 2.6.16-rc6-mm1.
- Fix compile errors against Hotadd/NoHotadd, NUMA/NonNUMA, etc.
- Add/update some comments.
- Some functions which can be static become static.
- not call add_memory() for already exist memory at acpi_memory_enable_device()

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