Skip to contentSkip to conversation

+ memblock-mem_hotplug-introduce-memblock_hotplug-flag-to-mark-hotpluggable-regions.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Dec 3, 2013

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: + memblock-mem_hotplug-introduce-memblock_hotplug-flag-to-mark-hotpluggable-regions.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 03 Dec 2013 15:54:39 -0800

The patch titled
Subject: memblock, mem_hotplug: introduce MEMBLOCK_HOTPLUG flag to mark hotpluggable regions
has been added to the -mm tree. Its filename is
memblock-mem_hotplug-introduce-memblock_hotplug-flag-to-mark-hotpluggable-regions.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/memblock-mem_hotplug-introduce-memblock_hotplug-flag-to-mark-hotpluggable-regions.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/memblock-mem_hotplug-introduce-memblock_hotplug-flag-to-mark-hotpluggable-regions.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Tang Chen <[email protected]>
Subject: memblock, mem_hotplug: introduce MEMBLOCK_HOTPLUG flag to mark hotpluggable regions

In find_hotpluggable_memory, once we find out a memory region which is hotpluggable, we want to mark them in memblock.memory. So that we could control memblock allocator not to allocte hotpluggable memory for the kernel later.

To achieve this goal, we introduce MEMBLOCK_HOTPLUG flag to indicate the hotpluggable memory regions in memblock and a function memblock_mark_hotplug() to mark hotpluggable memory if we find one.

Cc "H. Peter Anvin" <[email protected]>
Cc "Rafael J . Wysocki" <[email protected]>
Cc Chen Tang <[email protected]>
Cc Gong Chen <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Jiang Liu <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc Lai Jiangshan <[email protected]>
Cc Larry Woodman <[email protected]>
Cc Len Brown <[email protected]>
Cc Liu Jiang <[email protected]>
Cc Mel Gorman <[email protected]>
Cc Michal Nazarewicz <[email protected]>
Cc Minchan Kim <[email protected]>
Cc Prarit Bhargava <[email protected]>
Cc Rik van Riel <[email protected]>
Cc Taku Izumi <[email protected]>
Cc Tejun Heo <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Thomas Renninger <[email protected]>
Cc Toshi Kani <[email protected]>
Cc Vasilis Liaskovitis <[email protected]>
Cc Wanpeng Li <[email protected]>
Cc Wen Congyang <[email protected]>
Cc Yasuaki Ishimatsu <[email protected]>
Cc Yinghai Lu <[email protected]>

---

 include/linux/memblock.h |   17 ++++++++++++
 mm/memblock.c            |   52 +++++++++++++++++++++++++++++++++++++
 2 files changed, 69 insertions(+)
include/linux/memblock.h renamed from include/linux/memblock.h~memblock-mem_hotplug-introduce-memblock_hotplug-flag-to-mark-hotpluggable-regions +17 -0
diff -puN include/linux/memblock.h~memblock-mem_hotplug-introduce-memblock_hotplug-flag-to-mark-hotpluggable-regions include/linux/memblock.h
@@ -19,6 +19,9 @@
 
 #define INIT_MEMBLOCK_REGIONS	128
 
+/* Definition of memblock flags. */
+#define MEMBLOCK_HOTPLUG	0x1	/* hotpluggable region */
+
 struct memblock_region {
 	phys_addr_t base;
 	phys_addr_t size;
@@ -60,6 +63,8 @@ int memblock_remove(phys_addr_t base, ph
 int memblock_free(phys_addr_t base, phys_addr_t size);
 int memblock_reserve(phys_addr_t base, phys_addr_t size);
 void memblock_trim_memory(phys_addr_t align);
+int memblock_mark_hotplug(phys_addr_t base, phys_addr_t size);
+int memblock_clear_hotplug(phys_addr_t base, phys_addr_t size);
 
 #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP
 int memblock_search_pfn_nid(unsigned long pfn, unsigned long *start_pfn,
@@ -122,6 +127,18 @@ void __next_free_mem_range_rev(u64 *idx,
 	     i != (u64)ULLONG_MAX;					\
 	     __next_free_mem_range_rev(&i, nid, p_start, p_end, p_nid))
 
+static inline void memblock_set_region_flags(struct memblock_region *r,
+					     unsigned long flags)
+{
+	r->flags |= flags;
+}
+
+static inline void memblock_clear_region_flags(struct memblock_region *r,
+					       unsigned long flags)
+{
+	r->flags &= ~flags;
+}
+
 #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP
 int memblock_set_node(phys_addr_t base, phys_addr_t size, int nid);
 
mm/memblock.c renamed from mm/memblock.c~memblock-mem_hotplug-introduce-memblock_hotplug-flag-to-mark-hotpluggable-regions +52 -0

58 lines not on this page · raw message

_

Patches currently in -mm which might be from [email protected] are

x86-get-pg_data_ts-memory-from-other-node.patch memblock-numa-introduce-flags-field-into-memblock.patch memblock-mem_hotplug-introduce-memblock_hotplug-flag-to-mark-hotpluggable-regions.patch memblock-make-memblock_set_node-support-different-memblock_type.patch acpi-numa-mem_hotplug-mark-hotpluggable-memory-in-memblock.patch acpi-numa-mem_hotplug-mark-all-nodes-the-kernel-resides-un-hotpluggable.patch memblock-mem_hotplug-make-memblock-skip-hotpluggable-regions-if-needed.patch x86-numa-acpi-memory-hotplug-make-movable_node-have-higher-priority.patch