lkml.org 
[lkml]   [2018]   [Dec]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[RFC][PATCH v2 04/21] x86/numa_emulation: pass numa node type to fake nodes
From: Fan Du <fan.du@intel.com>

Signed-off-by: Fan Du <fan.du@intel.com>
---
arch/x86/mm/numa_emulation.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)

--- linux.orig/arch/x86/mm/numa_emulation.c 2018-12-23 19:21:11.002206144 +0800
+++ linux/arch/x86/mm/numa_emulation.c 2018-12-23 19:21:10.998206236 +0800
@@ -12,6 +12,8 @@

static int emu_nid_to_phys[MAX_NUMNODES];
static char *emu_cmdline __initdata;
+static nodemask_t emu_numa_nodes_pmem;
+static nodemask_t emu_numa_nodes_dram;

void __init numa_emu_cmdline(char *str)
{
@@ -311,6 +313,12 @@ static int __init split_nodes_size_inter
min(end, limit) - start);
if (ret < 0)
return ret;
+
+ /* Update numa node type for fake numa node */
+ if (node_isset(i, emu_numa_nodes_pmem))
+ node_set(nid - 1, numa_nodes_pmem);
+ else
+ node_set(nid - 1, numa_nodes_dram);
}
}
return nid;
@@ -410,6 +418,12 @@ void __init numa_emulation(struct numa_m
unsigned long n;
int nid = 0;

+ emu_numa_nodes_pmem = numa_nodes_pmem;
+ emu_numa_nodes_dram = numa_nodes_dram;
+
+ nodes_clear(numa_nodes_pmem);
+ nodes_clear(numa_nodes_dram);
+
n = simple_strtoul(emu_cmdline, &emu_cmdline, 0);
ret = -1;
for_each_node_mask(i, physnode_mask) {

\
 
 \ /
  Last update: 2018-12-26 14:39    [W:0.910 / U:4.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site