From: Michael Bringmann <mwb@linux.vnet.ibm.com>
To: Reza Arbab <arbab@linux.vnet.ibm.com>
Cc: Balbir Singh <bsingharora@gmail.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
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.ib>,
Shailendra Singh <shailendras@nvidia.com>,
Thomas Gleixner <tglx@linutronix.de>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc
Date: Tue, 23 May 2017 17:44:23 -0500 [thread overview]
Message-ID: <ee96df3d-ad0f-c4dc-e7d5-290018ec8afd@linux.vnet.ibm.com> (raw)
In-Reply-To: <20170523214922.bns675oqzqj4pkhc@arbab-laptop.localdomain>
On 05/23/2017 04:49 PM, Reza Arbab wrote:
> On Tue, May 23, 2017 at 03:05:08PM -0500, Michael Bringmann wrote:
>> On 05/23/2017 10:52 AM, Reza Arbab wrote:
>>> On Tue, May 23, 2017 at 10:15:44AM -0500, Michael Bringmann wrote:
>>>> +static void setup_nodes(void)
>>>> +{
>>>> + int i, l = 32 /* MAX_NUMNODES */;
>>>> +
>>>> + for (i = 0; i < l; i++) {
>>>> + if (!node_possible(i)) {
>>>> + setup_node_data(i, 0, 0);
>>>> + node_set(i, node_possible_map);
>>>> + }
>>>> + }
>>>> +}
>>>
>>> This seems to be a workaround for 3af229f2071f ("powerpc/numa: Reset node_possible_map to only node_online_map").
>>
>> They may be related, but that commit is not a replacement. The above patch ensures that
>> there are enough of the nodes initialized at startup to allow for memory hot-add into a
>> node that was not used at boot. (See 'setup_node_data' function in 'numa.c'.) That and
>> recording that the node was initialized.
>
> Is it really necessary to preinitialize these empty nodes using setup_node_data()? When you do memory hotadd into a node that was not used at boot, the node data already gets set up by
>
> add_memory
> add_memory_resource
> hotadd_new_pgdat
> arch_alloc_nodedata <-- allocs the pg_data_t
> ...
> free_area_init_node <-- sets NODE_DATA(nid)->node_id, etc.
>
> Removing setup_node_data() from that loop leaves only the call to node_set(). If 3af229f2071f (which reduces node_possible_map) was reverted, you wouldn't need to do that either.
With or without 3af229f2071f, we would still need to add something, somewhere to add new
bits to the 'node_possible_map'. That is not being done.
>
>> I didn't see where any part of commit 3af229f2071f would touch the 'node_possible_map'
>> which is needed by 'numa.c' and 'workqueue.c'. The nodemask created and updated by
>> 'mem_cgroup_may_update_nodemask()' does not appear to be the same mask.
>
> Are you sure you're looking at 3af229f2071f? It only adds one line of code; the reduction of node_possible_map.
>
--
Michael W. Bringmann
Linux Technology Center
IBM Corporation
Tie-Line 363-5196
External: (512) 286-5196
Cell: (512) 466-0650
mwb@linux.vnet.ibm.com
next prev parent reply other threads:[~2017-05-23 22:44 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-23 15:15 [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc 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 [this message]
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
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
2017-06-14 5:25 ` Balbir Singh
2017-06-14 5:27 ` Balbir Singh
2017-06-14 13:41 ` Michael Bringmann
2017-06-07 17:17 ` 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=ee96df3d-ad0f-c4dc-e7d5-290018ec8afd@linux.vnet.ibm.com \
--to=mwb@linux.vnet.ibm.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=arbab@linux.vnet.ibm.com \
--cc=bharata@linux.vnet.ib \
--cc=bigeasy@linutronix.de \
--cc=bsingharora@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--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;
as well as URLs for NNTP newsgroup(s).