File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -25,11 +25,7 @@ nodemask_t numa_nodes_parsed __initdata;
25
25
struct pglist_data * node_data [MAX_NUMNODES ] __read_mostly ;
26
26
EXPORT_SYMBOL (node_data );
27
27
28
- static struct numa_meminfo numa_meminfo
29
- #ifndef CONFIG_MEMORY_HOTPLUG
30
- __initdata
31
- #endif
32
- ;
28
+ static struct numa_meminfo numa_meminfo __initdata_or_meminfo ;
33
29
34
30
static int numa_distance_cnt ;
35
31
static u8 * numa_distance ;
Original file line number Diff line number Diff line change 13
13
14
14
#define NUMA_NO_NODE (-1)
15
15
16
+ /* optionally keep NUMA memory info available post init */
17
+ #ifdef CONFIG_NUMA_KEEP_MEMINFO
18
+ #define __initdata_or_meminfo
19
+ #else
20
+ #define __initdata_or_meminfo __initdata
21
+ #endif
22
+
16
23
#ifdef CONFIG_NUMA
17
24
int numa_map_to_online_node (int node );
18
25
#else
Original file line number Diff line number Diff line change @@ -139,6 +139,10 @@ config HAVE_FAST_GUP
139
139
config ARCH_KEEP_MEMBLOCK
140
140
bool
141
141
142
+ # Keep arch NUMA mapping infrastructure post-init.
143
+ config NUMA_KEEP_MEMINFO
144
+ bool
145
+
142
146
config MEMORY_ISOLATION
143
147
bool
144
148
@@ -154,6 +158,7 @@ config MEMORY_HOTPLUG
154
158
bool "Allow for memory hot-add"
155
159
depends on SPARSEMEM || X86_64_ACPI_NUMA
156
160
depends on ARCH_ENABLE_MEMORY_HOTPLUG
161
+ select NUMA_KEEP_MEMINFO if NUMA
157
162
158
163
config MEMORY_HOTPLUG_SPARSE
159
164
def_bool y
You can’t perform that action at this time.
0 commit comments