linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: Nathan Lynch <nathanl@linux.ibm.com>,
	Daniel Henrique Barboza <danielhb413@gmail.com>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [RFC PATCH 4/8] powerpc/pseries: Consolidate DLPAR NUMA distance update
Date: Tue, 15 Jun 2021 13:56:05 +0530	[thread overview]
Message-ID: <3b88a869-a865-6505-e4a1-9985811e8e4d@linux.ibm.com> (raw)
In-Reply-To: <YMga6CtDlIB0wLbp@yekko>

On 6/15/21 8:43 AM, David Gibson wrote:
> On Mon, Jun 14, 2021 at 10:09:59PM +0530, Aneesh Kumar K.V wrote:
>> The associativity details of the newly added resourced are collected from
>> the hypervisor via "ibm,configure-connector" rtas call. Update the numa
>> distance details of the newly added numa node after the above call. In
>> later patch we will remove updating NUMA distance when we are looking
>> for node id from associativity array.
>>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
>> ---
>>   arch/powerpc/mm/numa.c                        | 41 +++++++++++++++++++
>>   arch/powerpc/platforms/pseries/hotplug-cpu.c  |  2 +
>>   .../platforms/pseries/hotplug-memory.c        |  2 +
>>   arch/powerpc/platforms/pseries/pseries.h      |  1 +
>>   4 files changed, 46 insertions(+)
>>
>> diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
>> index 192067991f8a..fec47981c1ef 100644
>> --- a/arch/powerpc/mm/numa.c
>> +++ b/arch/powerpc/mm/numa.c
>> @@ -287,6 +287,47 @@ int of_node_to_nid(struct device_node *device)
>>   }
>>   EXPORT_SYMBOL(of_node_to_nid);
>>   
>> +static void __initialize_form1_numa_distance(const __be32 *associativity)
>> +{
>> +	int i, nid;
>> +
>> +	if (of_read_number(associativity, 1) >= primary_domain_index) {
>> +		nid = of_read_number(&associativity[primary_domain_index], 1);
>> +
>> +		for (i = 0; i < max_domain_index; i++) {
>> +			const __be32 *entry;
>> +
>> +			entry = &associativity[be32_to_cpu(distance_ref_points[i])];
>> +			distance_lookup_table[nid][i] = of_read_number(entry, 1);
>> +		}
>> +	}
>> +}
> 
> This logic is almost identicaly to initialize_distance_lookup_table()
> - it would be good if they could be consolidated, so it's clear that
> coldplugged and hotplugged nodes are parsing the NUMA information in
> the same way.

initialize_distance_lookup_table() gets removed in the next patch.

-aneesh

  reply	other threads:[~2021-06-15  8:26 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-14 16:39 [RFC PATCH 0/8] Add support for FORM2 associativity Aneesh Kumar K.V
2021-06-14 16:39 ` [RFC PATCH 1/8] powerpc/pseries: rename min_common_depth to primary_domain_index Aneesh Kumar K.V
2021-06-15  3:00   ` David Gibson
2021-06-15  8:21     ` Aneesh Kumar K.V
2021-06-14 16:39 ` [RFC PATCH 2/8] powerpc/pseries: rename distance_ref_points_depth to max_domain_index Aneesh Kumar K.V
2021-06-15  3:01   ` David Gibson
2021-06-15  8:22     ` Aneesh Kumar K.V
2021-06-14 16:39 ` [RFC PATCH 3/8] powerpc/pseries: Rename TYPE1_AFFINITY to FORM1_AFFINITY Aneesh Kumar K.V
2021-06-15  3:04   ` David Gibson
2021-06-14 16:39 ` [RFC PATCH 4/8] powerpc/pseries: Consolidate DLPAR NUMA distance update Aneesh Kumar K.V
2021-06-15  3:13   ` David Gibson
2021-06-15  8:26     ` Aneesh Kumar K.V [this message]
2021-06-14 16:40 ` [RFC PATCH 5/8] powerpc/pseries: Consolidate NUMA distance update during boot Aneesh Kumar K.V
2021-06-14 16:40 ` [RFC PATCH 6/8] powerpc/pseries: Add a helper for form1 cpu distance Aneesh Kumar K.V
2021-06-15  3:21   ` David Gibson
2021-06-14 16:40 ` [RFC PATCH 7/8] powerpc/pseries: Add support for FORM2 associativity Aneesh Kumar K.V
2021-06-15  3:53   ` David Gibson
2021-06-15  5:28     ` Aneesh Kumar K.V
2021-06-15  6:25       ` David Gibson
2021-06-15  7:40         ` Aneesh Kumar K.V
2021-06-17  7:50           ` David Gibson
2021-06-17 10:46             ` Aneesh Kumar K.V
2021-06-14 16:40 ` [RFC PATCH 8/8] powerpc/papr_scm: Use FORM2 associativity details Aneesh Kumar K.V
2021-06-15  3:55   ` David Gibson
2021-06-15  5:57     ` Aneesh Kumar K.V
2021-06-15  6:34       ` David Gibson
2021-06-15  7:05         ` Aneesh Kumar K.V
2021-06-17  7:46           ` David Gibson
2021-06-17 10:53             ` Daniel Henrique Barboza
2021-06-17 11:11               ` Aneesh Kumar K.V
2021-06-17 11:46                 ` Aneesh Kumar K.V
2021-06-17 20:00                 ` Daniel Henrique Barboza
2021-06-18  3:18                   ` Aneesh Kumar K.V
2021-06-17 10:59             ` Aneesh Kumar K.V
2021-06-24  3:16               ` David Gibson
2021-06-17 13:55             ` Aneesh Kumar K.V
2021-06-17 14:04               ` Aneesh Kumar K.V
2021-06-15  1:47 ` [RFC PATCH 0/8] Add support for FORM2 associativity Daniel Henrique Barboza

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=3b88a869-a865-6505-e4a1-9985811e8e4d@linux.ibm.com \
    --to=aneesh.kumar@linux.ibm.com \
    --cc=danielhb413@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=nathanl@linux.ibm.com \
    /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).