From: Michael Ellerman <mpe@ellerman.id.au>
To: Michael Bringmann <mwb@linux.vnet.ibm.com>,
Reza Arbab <arbab@linux.vnet.ibm.com>
Cc: Balbir Singh <bsingharora@gmail.com>,
linux-kernel@vger.kernel.org, Paul Mackerras <paulus@samba.org>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Bharata B Rao <bharata@linux.vnet.ibm.com>,
Shailendra Singh <shailendras@nvidia.com>,
Thomas Gleixner <tglx@linutronix.de>,
linuxppc-dev@lists.ozlabs.org,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Michael Bringmann from Kernel Team <mbringm@us.ibm.com>
Subject: Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc
Date: Tue, 06 Jun 2017 19:48:06 +1000 [thread overview]
Message-ID: <8760g9qwfd.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <54ebacf1-1249-cc6a-80a5-b293e581f401@linux.vnet.ibm.com>
Michael Bringmann <mwb@linux.vnet.ibm.com> writes:
> On 06/01/2017 04:36 AM, Michael Ellerman wrote:
>> Do you actually see mention of nodes 0 and 8 in the dmesg?
>
> When the 'numa.c' code is built with debug messages, and the system was
> given that configuration by pHyp, yes, I did.
>
>> What does it say?
>
> The debug message for each core thread would be something like,
>
> removing cpu 64 from node 0
> adding cpu 64 to node 8
>
> repeated for all 8 threads of the CPU, and usually with the messages
> for all of the CPUs coming out intermixed on the console/dmesg log.
OK. I meant what do you see at boot.
I'm curious how we're discovering node 0 and 8 at all if neither has any
memory or CPUs assigned at boot.
>> Right. So it's not that you're hot adding memory into a previously
>> unseen node as you implied in earlier mails.
>
> In the sense that the nodes were defined in the device tree, that is correct.
Where are they defined in the device tree? That's what I'm trying to understand.
> In the sense that those nodes are currently deleted from node_possible_map in
> 'numa.c' by the instruction 'node_and(node_possible_map,node_possible_map,
> node_online_map);', the nodes are no longer available to place memory or CPU.
Yeah I understand that part.
> Okay, I can try to insert code that extracts all of the nodes from the
> ibm,associativity-lookup-arrays property and merge them with the nodes
> put into the online map from the CPUs that were found previously during
> boot of the powerpc code.
Hmm, will that work?
Looking at PAPR it's not clear to me that it will work for nodes that
have no memory assigned at boot.
This property is used to duplicate the function of the
“ibm,associativity” property in a /memory node. Each “assigned” LMB
represented has an index valued between 0 and M-1 which is used as in
index into this table to select which associativity list to use for
the LMB. “unassigned” LMBs are place holders for potential DLPAR
additions, for which the associativity list index is meaningless and
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
is given the reserved value of -1. This static property, need only
contain values relevant for the LMBs presented in the
“ibm,dynamicreconfiguration-memory” node; for a dynamic LPAR addition
of a new LMB, the device tree fragment reported by the
ibm,configure-connector RTAS function is a /memory node, with the
inclusion of the “ibm,associativity” device tree property defined in
Section C.6.2.2‚ “Properties of the Children of Root‚” on page 1059.
>> What does your device tree look like? Can you send us the output of:
>>
>> $ lsprop /proc/device-tree
Thanks. I forgot that lsprop will truncate long properties, I actually
wanted to see all of the ibm,dynamic-memory property.
But looking at the code I see the only place we set a nid online is if
there is a CPU assigned to it:
static int __init parse_numa_properties(void)
{
...
for_each_present_cpu(i) {
...
cpu = of_get_cpu_node(i, NULL);
nid = of_node_to_nid_single(cpu);
...
node_set_online(nid);
}
Or for memory nodes (same function):
for_each_node_by_type(memory, "memory") {
...
nid = of_node_to_nid_single(memory);
...
node_set_online(nid);
...
}
Or for entries in ibm,dynamic-memory that are assigned:
static void __init parse_drconf_memory(struct device_node *memory)
{
...
for (; n != 0; --n) {
...
/* skip this block if the reserved bit is set in flags (0x80)
or if the block is not assigned to this partition (0x8) */
if ((drmem.flags & DRCONF_MEM_RESERVED)
|| !(drmem.flags & DRCONF_MEM_ASSIGNED))
continue;
...
do {
...
nid = of_drconf_to_nid_single(&drmem, &aa);
node_set_online(nid);
...
} while (--ranges);
}
}
So I don't see from that how we can even be aware that node 0 and 8
exist at boot based on that. Maybe there's another path I'm missing
though.
cheers
next prev parent reply other threads:[~2017-06-06 9:48 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-23 15:15 Michael Bringmann
2017-05-23 15:52 ` Reza Arbab
2017-05-23 20:05 ` Michael Bringmann
2017-05-23 21:49 ` Reza Arbab
2017-05-23 22:41 ` Michael Bringmann
2017-05-23 22:44 ` Michael Bringmann
2017-05-24 11:19 ` Michael Ellerman
2017-05-24 23:55 ` Michael Bringmann
2017-05-25 6:19 ` Michael Ellerman
2017-05-25 13:40 ` Michael Bringmann
2017-05-25 15:10 ` Reza Arbab
2017-05-25 15:26 ` Michael Bringmann
2017-05-26 3:46 ` Balbir Singh
2017-05-26 3:46 ` Michael Ellerman
2017-05-26 12:31 ` Michael Bringmann
2017-05-26 14:31 ` Reza Arbab
2017-05-29 5:32 ` Michael Ellerman
2017-05-31 14:05 ` Michael Bringmann
2017-06-01 9:36 ` Michael Ellerman
2017-06-01 21:33 ` Reza Arbab
2017-06-07 8:06 ` Balbir Singh
2017-06-07 12:07 ` Michael Ellerman
2017-06-02 5:24 ` Michael Bringmann
2017-06-06 9:48 ` Michael Ellerman [this message]
2017-06-06 16:16 ` Michael Bringmann
2017-06-07 12:08 ` Michael Ellerman
2017-06-07 17:28 ` RESEND " Michael Bringmann
2017-06-13 10:45 ` Michael Ellerman
2017-06-13 22:21 ` Michael Bringmann
[not found] ` <CAKTCnz==4vA4PevndTLF7p2PPKCM8ZkqpuCXPp9kFcjn+CqUKA@mail.gmail.com>
2017-06-14 5:27 ` Balbir Singh
2017-06-14 13:41 ` Michael Bringmann
2017-05-24 14:36 ` Reza Arbab
2017-05-24 23:41 ` Michael Bringmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8760g9qwfd.fsf@concordia.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=arbab@linux.vnet.ibm.com \
--cc=bharata@linux.vnet.ibm.com \
--cc=bigeasy@linutronix.de \
--cc=bsingharora@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mbringm@us.ibm.com \
--cc=mwb@linux.vnet.ibm.com \
--cc=paulus@samba.org \
--cc=shailendras@nvidia.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®