linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH part4 0/4] Parse SRAT memory affinities earlier.
@ 2013-08-08  9:41 Tang Chen
  2013-08-08  9:41 ` [PATCH part4 1/4] x86: Make get_ramdisk_{image|size}() global Tang Chen
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Tang Chen @ 2013-08-08  9:41 UTC (permalink / raw)
  To: robert.moore, lv.zheng, rjw, lenb, tglx, mingo, hpa, akpm, tj,
	trenn, yinghai, jiang.liu, wency, laijs, isimatu.yasuaki,
	izumi.taku, mgorman, minchan, mina86, gong.chen,
	vasilis.liaskovitis, lwoodman, riel, jweiner, prarit, zhangyanfei,
	yanghy
  Cc: x86, linux-doc, linux-kernel, linux-mm, linux-acpi

The current Linux cannot migrate pages used by the kernel. When doing
memory hotplug, if the memory is used by the kernel, it cannot be 
hot-removed.

In order to prevent bootmem allocator (memblock) from allocating memory 
for the kernel, we have to parse SRAT at earlier time. 

When parsing ACPI tables at the system boot time, the current kernel 
works like this:

setup_arch()
 |->memblock_x86_fill()            /* memblock is ready. */
 |......
 |->acpi_initrd_override()         /* Find all tables specified by users in initrd,
 |                                    and store them in acpi_tables_addr array. */
 |......
 |->acpi_boot_table_init()         /* Find all tables in firmware and install them
                                      into acpi_gbl_root_table_list. Check acpi_tables_addr,
                                      if any table needs to be overrided, override it. */

In previous part3 patches modified it like this:

setup_arch()
 |->memblock_x86_fill()            /* memblock is ready. */
 |......
 |->early_acpi_boot_table_init()   /* Find all tables in firmware and install them 
 |                                    into acpi_gbl_root_table_list. No override. */
 |......
 |->acpi_initrd_override()         /* Find all tables specified by users in initrd,
 |                                    and store them in acpi_tables_addr array. */
 |......
 |->acpi_boot_table_init()         /* Check acpi_tables_addr, if any table needs to 
                                      be overrided, override it. */

We can obtain SRAT earlier now. So this patch-set will do the following things:

1. Try to find user specified SRAT in initrd file, if any, get it.
2. If there is no user specified SRAT in initrd file, to find SRAT 
   in firmware.
3. Parse all memory affinities in SRAT, and find all hotpluggable memory.

In later patches, we will improve memblock to mark and skip hotpluggable
memory when allocating memory.


Tang Chen (4):
  x86: Make get_ramdisk_{image|size}() global.
  x86, acpica, acpi: Try to find if SRAT is overrided earlier.
  x86, acpica, acpi: Try to find SRAT in firmware earlier.
  x86, acpi, numa, mem_hotplug: Find hotpluggable memory in SRAT memory
    affinities.

 arch/x86/include/asm/setup.h   |   21 +++++
 arch/x86/kernel/setup.c        |   28 +++----
 drivers/acpi/acpica/tbxface.c  |   32 ++++++++
 drivers/acpi/osl.c             |  168 ++++++++++++++++++++++++++++++++++++++++
 include/acpi/acpixf.h          |    4 +
 include/linux/acpi.h           |   20 ++++-
 include/linux/memory_hotplug.h |    2 +
 mm/memory_hotplug.c            |   47 +++++++++++-
 8 files changed, 301 insertions(+), 21 deletions(-)

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2013-08-12 14:25 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-08  9:41 [PATCH part4 0/4] Parse SRAT memory affinities earlier Tang Chen
2013-08-08  9:41 ` [PATCH part4 1/4] x86: Make get_ramdisk_{image|size}() global Tang Chen
2013-08-12 14:25   ` Tejun Heo
2013-08-08  9:41 ` [PATCH part4 2/4] x86, acpica, acpi: Try to find if SRAT is overrided earlier Tang Chen
2013-08-08  9:41 ` [PATCH part4 3/4] x86, acpica, acpi: Try to find SRAT in firmware earlier Tang Chen
2013-08-08  9:41 ` [PATCH part4 4/4] x86, acpi, numa, mem_hotplug: Find hotpluggable memory in SRAT memory affinities Tang Chen
2013-08-08 16:41   ` Yinghai Lu
2013-08-09  9:32     ` Tang Chen
2013-08-09 23:39       ` Yinghai Lu
2013-08-09 23:43         ` H. Peter Anvin
2013-08-09 23:53           ` Yinghai Lu
2013-08-09 23:56             ` H. Peter Anvin
2013-08-10  0:12               ` Yinghai Lu

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).