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 8/8] powerpc/papr_scm: Use FORM2 associativity details
Date: Thu, 17 Jun 2021 19:34:11 +0530 [thread overview]
Message-ID: <87lf78mvtw.fsf@linux.ibm.com> (raw)
In-Reply-To: <87o8c4mw89.fsf@linux.ibm.com>
Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> writes:
> David Gibson <david@gibson.dropbear.id.au> writes:
>
>> On Tue, Jun 15, 2021 at 12:35:17PM +0530, Aneesh Kumar K.V wrote:
>>> David Gibson <david@gibson.dropbear.id.au> writes:
>>>
>>> > On Tue, Jun 15, 2021 at 11:27:50AM +0530, Aneesh Kumar K.V wrote:
>>> >> David Gibson <david@gibson.dropbear.id.au> writes:
>>> >>
>>> >> > On Mon, Jun 14, 2021 at 10:10:03PM +0530, Aneesh Kumar K.V wrote:
> .....
>
>> I'm still not understanding why the latency we care about is different
>> in the two cases. Can you give an example of when this would result
>> in different actual node assignments for the two different cases?
>
> How about the below update?
>
> With Form2 "ibm,associativity" for resources is listed as below:
>
> "ibm,associativity" property for resources in node 0, 8 and 40
> { 3, 6, 7, 0 }
> { 3, 6, 9, 8 }
> { 4, 6, 7, 0, 40}
>
> With "ibm,associativity-reference-points" { 0x3, 0x2 }
>
> Form2 adds additional property which can be used with devices like persistence
> memory devices which would also like to be presented as memory-only NUMA nodes.
>
> "ibm,associativity-memory-node-reference-point" property contains a number
> representing the domainID index to be used to find the domainID that should be used
> when using the resource as memory only NUMA node. The NUMA distance information
> w.r.t this domainID will take into consideration the latency of the media. A
> high latency memory device will have a large NUMA distance value assigned w.r.t
> the domainID found at at "ibm,associativity-memory-node-reference-point" domainID index.
>
> prop-encoded-array: An integer encoded as with encode-int specifying the domainID index
>
> In the above example:
> "ibm,associativity-memory-node-reference-point" { 0x4 }
>
> ex:
>
> --------------------------------------
> | NUMA node0 |
> | ProcA -----> MEMA |
> | | |
> | | |
> | -------------------> PMEMB |
> | |
> ---------------------------------------
>
> ---------------------------------------
> | NUMA node1 |
> | |
> | ProcB -------> MEMC |
> | | |
> | -------------------> PMEMD |
> | |
> | |
> ---------------------------------------
>
> --------------------------------------------------------------------------------
> | domainID 20 |
> | --------------------------------------- |
> | | NUMA node0 | |
> | | | -------------------- |
> | | ProcA -------> MEMA | | NUMA node40 | |
> | | | | | | |
> | | ---------------------------------- |--------> | PMEMB | |
> | | | -------------------- |
> | | | |
> | --------------------------------------- |
> | |
> | --------------------------------------- |
> | | NUMA node1 | |
> | | | |
> | | ProcB -------> MEMC | ------------------- |
> | | | | | NUMA node41 | |
> | | --------------------------------------------> | PMEMD | |
> | | | ------------------- |
> | | | |
> | --------------------------------------- |
> | |
> --------------------------------------------------------------------------------
>
> For a topology like the above application running of ProcA wants to find out
> persistent memory mount local to its NUMA node. Hence when using it as
> pmem fsdax mount or devdax device we want PMEMB to have associativity
> of NUMA node0 and PMEMD to have associativity of NUMA node1. But when
> we want to use it as memory using dax kmem driver, we want both PMEMB
> and PMEMD to appear as memory only NUMA node at a distance that is
> derived based on the latency of the media.
>
> "ibm,associativity":
> PROCA/MEMA -> { 2, 20, 0 }
> PROCB/MEMC -> { 2, 20, 1 }
> PMEMB -> { 3, 20, 0, 40}
> PMEMB -> { 3, 20, 1, 41}
>
> "ibm,associativity-reference-points" -> { 2, 1 }
> "ibm,associativity-memory-node-reference-points" -> { 3 }
Another option is to make sure that numa-distance-value is populated
such that PMEMB distance indicates it is closer to node0 when compared
to node1. ie, node_distance[40][0] < node_distance[40][1]. One could
possibly infer the grouping based on the distance value and not deepend
on ibm,associativity for that purpose.
-aneesh
next prev parent reply other threads:[~2021-06-17 14:04 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
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 [this message]
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=87lf78mvtw.fsf@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).