aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorMichal Hocko <mhocko@suse.com>2017-07-06 18:41:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-06 19:24:35 -0400
commitf70029bbaacbfa8f082d2b4988717cba4e269f17 (patch)
treeda4860c5227a317637194b6ca9ee4c6becfddb53 /include/linux
parent57c0a17238e22395428248c53f8e390c051c88b8 (diff)
mm, memory_hotplug: drop CONFIG_MOVABLE_NODE
Commit 20b2f52b73fe ("numa: add CONFIG_MOVABLE_NODE for movable-dedicated node") has introduced CONFIG_MOVABLE_NODE without a good explanation on why it is actually useful. It makes a lot of sense to make movable node semantic opt in but we already have that because the feature has to be explicitly enabled on the kernel command line. A config option on top only makes the configuration space larger without a good reason. It also adds an additional ifdefery that pollutes the code. Just drop the config option and make it de-facto always enabled. This shouldn't introduce any change to the semantic. Link: http://lkml.kernel.org/r/20170529114141.536-3-mhocko@kernel.org Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Reza Arbab <arbab@linux.vnet.ibm.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Mel Gorman <mgorman@suse.de> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Jerome Glisse <jglisse@redhat.com> Cc: Yasuaki Ishimatsu <yasu.isimatu@gmail.com> Cc: Xishi Qiu <qiuxishi@huawei.com> Cc: Kani Toshimitsu <toshi.kani@hpe.com> Cc: Chen Yucong <slaoub@gmail.com> Cc: Joonsoo Kim <js1304@gmail.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: David Rientjes <rientjes@google.com> Cc: Daniel Kiper <daniel.kiper@oracle.com> Cc: Igor Mammedov <imammedo@redhat.com> Cc: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/memblock.h18
-rw-r--r--include/linux/nodemask.h4
2 files changed, 0 insertions, 22 deletions
diff --git a/include/linux/memblock.h b/include/linux/memblock.h
index 8098695e5d8d..1199e605d676 100644
--- a/include/linux/memblock.h
+++ b/include/linux/memblock.h
@@ -57,10 +57,8 @@ struct memblock {
57 57
58extern struct memblock memblock; 58extern struct memblock memblock;
59extern int memblock_debug; 59extern int memblock_debug;
60#ifdef CONFIG_MOVABLE_NODE
61/* If movable_node boot option specified */ 60/* If movable_node boot option specified */
62extern bool movable_node_enabled; 61extern bool movable_node_enabled;
63#endif /* CONFIG_MOVABLE_NODE */
64 62
65#ifdef CONFIG_ARCH_DISCARD_MEMBLOCK 63#ifdef CONFIG_ARCH_DISCARD_MEMBLOCK
66#define __init_memblock __meminit 64#define __init_memblock __meminit
@@ -169,7 +167,6 @@ void __next_reserved_mem_region(u64 *idx, phys_addr_t *out_start,
169 i != (u64)ULLONG_MAX; \ 167 i != (u64)ULLONG_MAX; \
170 __next_reserved_mem_region(&i, p_start, p_end)) 168 __next_reserved_mem_region(&i, p_start, p_end))
171 169
172#ifdef CONFIG_MOVABLE_NODE
173static inline bool memblock_is_hotpluggable(struct memblock_region *m) 170static inline bool memblock_is_hotpluggable(struct memblock_region *m)
174{ 171{
175 return m->flags & MEMBLOCK_HOTPLUG; 172 return m->flags & MEMBLOCK_HOTPLUG;
@@ -179,16 +176,6 @@ static inline bool __init_memblock movable_node_is_enabled(void)
179{ 176{
180 return movable_node_enabled; 177 return movable_node_enabled;
181} 178}
182#else
183static inline bool memblock_is_hotpluggable(struct memblock_region *m)
184{
185 return false;
186}
187static inline bool movable_node_is_enabled(void)
188{
189 return false;
190}
191#endif
192 179
193static inline bool memblock_is_mirror(struct memblock_region *m) 180static inline bool memblock_is_mirror(struct memblock_region *m)
194{ 181{
@@ -296,7 +283,6 @@ phys_addr_t memblock_alloc_try_nid(phys_addr_t size, phys_addr_t align, int nid)
296 283
297phys_addr_t memblock_alloc(phys_addr_t size, phys_addr_t align); 284phys_addr_t memblock_alloc(phys_addr_t size, phys_addr_t align);
298 285
299#ifdef CONFIG_MOVABLE_NODE
300/* 286/*
301 * Set the allocation direction to bottom-up or top-down. 287 * Set the allocation direction to bottom-up or top-down.
302 */ 288 */
@@ -314,10 +300,6 @@ static inline bool memblock_bottom_up(void)
314{ 300{
315 return memblock.bottom_up; 301 return memblock.bottom_up;
316} 302}
317#else
318static inline void __init memblock_set_bottom_up(bool enable) {}
319static inline bool memblock_bottom_up(void) { return false; }
320#endif
321 303
322/* Flags for memblock_alloc_base() amd __memblock_alloc_base() */ 304/* Flags for memblock_alloc_base() amd __memblock_alloc_base() */
323#define MEMBLOCK_ALLOC_ANYWHERE (~(phys_addr_t)0) 305#define MEMBLOCK_ALLOC_ANYWHERE (~(phys_addr_t)0)
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h
index f746e44d4046..cf0b91c3ec12 100644
--- a/include/linux/nodemask.h
+++ b/include/linux/nodemask.h
@@ -387,11 +387,7 @@ enum node_states {
387#else 387#else
388 N_HIGH_MEMORY = N_NORMAL_MEMORY, 388 N_HIGH_MEMORY = N_NORMAL_MEMORY,
389#endif 389#endif
390#ifdef CONFIG_MOVABLE_NODE
391 N_MEMORY, /* The node has memory(regular, high, movable) */ 390 N_MEMORY, /* The node has memory(regular, high, movable) */
392#else
393 N_MEMORY = N_HIGH_MEMORY,
394#endif
395 N_CPU, /* The node has one or more cpus */ 391 N_CPU, /* The node has one or more cpus */
396 NR_NODE_STATES 392 NR_NODE_STATES
397}; 393};