Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1683505
| From | Wei Yang <richard.weiyang@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH V3 3/3] x86/numa_emulation: restructures numa_nodes_parsed from emulated nodes |
| Date | 2017-07-08 03:40 +0200 |
| Message-ID | <u0MT0-3ZJ-11@gated-at.bofh.it> (permalink) |
| References | <u0MSZ-3ZJ-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
By emulating numa, it may contains more or less nodes than physical nodes. In numa_emulation(), numa_meminfo/numa_distance/__apicid_to_node is restructured according to emulated nodes, except numa_nodes_parsed. This patch restructures numa_nodes_parsed from emulated nodes. Signed-off-by: Wei Yang <richard.weiyang@gmail.com> Acked-by: David Rientjes <rientjes@google.com> --- arch/x86/mm/numa_emulation.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/mm/numa_emulation.c b/arch/x86/mm/numa_emulation.c index 80904ede2e7f..d805162e6045 100644 --- a/arch/x86/mm/numa_emulation.c +++ b/arch/x86/mm/numa_emulation.c @@ -395,6 +395,13 @@ void __init numa_emulation(struct numa_meminfo *numa_meminfo, int numa_dist_cnt) /* commit */ *numa_meminfo = ei; + /* Make sure numa_nodes_parsed only contains emulated nodes */ + nodes_clear(numa_nodes_parsed); + for (i = 0; i < ARRAY_SIZE(ei.blk); i++) + if (ei.blk[i].start != ei.blk[i].end && + ei.blk[i].nid != NUMA_NO_NODE) + node_set(ei.blk[i].nid, numa_nodes_parsed); + /* * Transform __apicid_to_node table to use emulated nids by * reverse-mapping phys_nid. The maps should always exist but fall -- 2.11.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V3 0/3] Refine numa_emulation Wei Yang <richard.weiyang@gmail.com> - 2017-07-08 03:40 +0200 [PATCH V3 2/3] x86/numa_emulation: assign physnode_mask directly from numa_nodes_parsed Wei Yang <richard.weiyang@gmail.com> - 2017-07-08 03:40 +0200 [PATCH V3 3/3] x86/numa_emulation: restructures numa_nodes_parsed from emulated nodes Wei Yang <richard.weiyang@gmail.com> - 2017-07-08 03:40 +0200 [PATCH V3 1/3] x86/numa_emulation: refine the calculation of max_emu_nid and dfl_phys_nid Wei Yang <richard.weiyang@gmail.com> - 2017-07-08 03:40 +0200
csiph-web