Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1620319 > unrolled thread
| Started by | Wei Yang <richard.weiyang@gmail.com> |
|---|---|
| First post | 2017-04-10 19:00 +0200 |
| Last post | 2017-04-11 03:50 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 3/3] x86/numa_emulation: restructures numa_nodes_parsed from emulated nodes Wei Yang <richard.weiyang@gmail.com> - 2017-04-10 19:00 +0200
Re: [PATCH 3/3] x86/numa_emulation: restructures numa_nodes_parsed from emulated nodes David Rientjes <rientjes@google.com> - 2017-04-11 02:40 +0200
Re: [PATCH 3/3] x86/numa_emulation: restructures numa_nodes_parsed from emulated nodes Wei Yang <richard.weiyang@gmail.com> - 2017-04-11 03:50 +0200
| From | Wei Yang <richard.weiyang@gmail.com> |
|---|---|
| Date | 2017-04-10 19:00 +0200 |
| Subject | [PATCH 3/3] x86/numa_emulation: restructures numa_nodes_parsed from emulated nodes |
| Message-ID | <tuKPv-3hW-17@gated-at.bofh.it> |
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> --- 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 a6d01931b9a1..14f075fc4cc5 100644 --- a/arch/x86/mm/numa_emulation.c +++ b/arch/x86/mm/numa_emulation.c @@ -391,6 +391,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 */ + numa_nodes_parsed = NODE_MASK_NONE; + 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
[toc] | [next] | [standalone]
| From | David Rientjes <rientjes@google.com> |
|---|---|
| Date | 2017-04-11 02:40 +0200 |
| Subject | Re: [PATCH 3/3] x86/numa_emulation: restructures numa_nodes_parsed from emulated nodes |
| Message-ID | <tuS0F-88h-1@gated-at.bofh.it> |
| In reply to | #1620319 |
On Tue, 11 Apr 2017, Wei Yang wrote: > 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> although there's a small nit: NODE_MASK_NONE is only used for initialization, this should be nodes_clear(numa_nodes_parsed) instead, but that would be up to the x86 maintainers to allow it. > --- > 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 a6d01931b9a1..14f075fc4cc5 100644 > --- a/arch/x86/mm/numa_emulation.c > +++ b/arch/x86/mm/numa_emulation.c > @@ -391,6 +391,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 */ > + numa_nodes_parsed = NODE_MASK_NONE; > + 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
[toc] | [prev] | [next] | [standalone]
| From | Wei Yang <richard.weiyang@gmail.com> |
|---|---|
| Date | 2017-04-11 03:50 +0200 |
| Subject | Re: [PATCH 3/3] x86/numa_emulation: restructures numa_nodes_parsed from emulated nodes |
| Message-ID | <tuT6q-mh-21@gated-at.bofh.it> |
| In reply to | #1620808 |
[Multipart message — attachments visible in raw view] — view raw
On Mon, Apr 10, 2017 at 05:36:25PM -0700, David Rientjes wrote: >On Tue, 11 Apr 2017, Wei Yang wrote: > >> 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> > >although there's a small nit: NODE_MASK_NONE is only used for >initialization, this should be nodes_clear(numa_nodes_parsed) instead, but >that would be up to the x86 maintainers to allow it. > Thanks for pointing out :-) I would pay attention to this next time. >> --- >> 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 a6d01931b9a1..14f075fc4cc5 100644 >> --- a/arch/x86/mm/numa_emulation.c >> +++ b/arch/x86/mm/numa_emulation.c >> @@ -391,6 +391,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 */ >> + numa_nodes_parsed = NODE_MASK_NONE; >> + 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 -- Wei Yang Help you, Help me
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web