Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1233724
| From | Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH RFC 5/5] powerpc:numa Use chipid to nid mapping to get serial numa node ids |
| Date | 2015-09-27 20:30 +0200 |
| Message-ID | <qdoRY-6G6-23@gated-at.bofh.it> (permalink) |
| References | <qdoRX-6G6-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Also properly initialize numa distance table for serial nids.
Problem: Powerpc supports sparse nid numbering which could affect
1) memory footprint 2) virtualization use cases
Current solution:
The patch maps sprase chipid got fromn device tree to serail
nids.
Result before:
node 0 1 16 17
0: 10 20 40 40
1: 20 10 40 40
16: 40 40 10 20
17: 40 40 20 10
After:
node 0 1 2 3
0: 10 20 40 40
1: 20 10 40 40
2: 40 40 10 20
3: 40 40 20 10
Testing: Scenarios tested on baremetal and KVM guest with 4 nodes
1) offlining and onlining memory and cpus
2) Running the tests from numactl source.
3) Creating 1000s of docker containers stressing the system
Signed-off-by: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
---
arch/powerpc/mm/numa.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index f015cad..873ac8c 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -304,7 +304,8 @@ static int associativity_to_chipid(const __be32 *associativity)
/*
* Skip the length field and send start of associativity array
*/
- initialize_distance_lookup_table(chipid, associativity + 1);
+ initialize_distance_lookup_table(chipid_to_nid(chipid),
+ associativity + 1);
}
out:
@@ -314,9 +315,10 @@ out:
/* Return the nid from associativity */
static int associativity_to_nid(const __be32 *associativity)
{
- int nid;
+ int chipid, nid;
- nid = associativity_to_chipid(associativity);
+ chipid = associativity_to_chipid(associativity);
+ nid = map_chipid_to_nid(chipid);
return nid;
}
@@ -340,9 +342,10 @@ static int of_node_to_chipid_single(struct device_node *device)
*/
static int of_node_to_nid_single(struct device_node *device)
{
- int nid;
+ int chipid, nid;
- nid = of_node_to_chipid_single(device);
+ chipid = of_node_to_chipid_single(device);
+ nid = map_chipid_to_nid(chipid);
return nid;
}
--
1.7.11.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH RFC 0/5] powerpc:numa Add serial nid support Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> - 2015-09-27 20:30 +0200
[PATCH RFC 5/5] powerpc:numa Use chipid to nid mapping to get serial numa node ids Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> - 2015-09-27 20:30 +0200
[PATCH RFC 4/5] powerpc:numa Add helper functions to maintain chipid to nid mapping Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> - 2015-09-27 20:30 +0200
Re: [PATCH RFC 4/5] powerpc:numa Add helper functions to maintain chipid to nid mapping Nishanth Aravamudan <nacc@linux.vnet.ibm.com> - 2015-09-28 19:40 +0200
Re: [PATCH RFC 4/5] powerpc:numa Add helper functions to maintain chipid to nid mapping Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> - 2015-09-29 21:10 +0200
Re: [PATCH RFC 0/5] powerpc:numa Add serial nid support Denis Kirjanov <kda@linux-powerpc.org> - 2015-09-28 13:00 +0200
Re: [PATCH RFC 0/5] powerpc:numa Add serial nid support Nishanth Aravamudan <nacc@linux.vnet.ibm.com> - 2015-09-28 19:10 +0200
Re: [PATCH RFC 0/5] powerpc:numa Add serial nid support Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> - 2015-09-29 20:20 +0200
Re: [PATCH RFC 0/5] powerpc:numa Add serial nid support Denis Kirjanov <kda@linux-powerpc.org> - 2015-09-29 21:50 +0200
Re: [PATCH RFC 0/5] powerpc:numa Add serial nid support Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> - 2015-09-30 08:20 +0200
Re: [PATCH RFC 0/5] powerpc:numa Add serial nid support Nishanth Aravamudan <nacc@linux.vnet.ibm.com> - 2015-09-28 19:40 +0200
Re: [PATCH RFC 0/5] powerpc:numa Add serial nid support Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> - 2015-09-29 21:20 +0200
csiph-web