Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1224589 > unrolled thread
| Started by | Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> |
|---|---|
| First post | 2015-09-15 04:10 +0200 |
| Last post | 2015-09-22 21:40 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH V2 2/2] powerpc:numa Do not allocate bootmem memory for non existing nodes Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> - 2015-09-15 04:10 +0200
Re: [PATCH V2 2/2] powerpc:numa Do not allocate bootmem memory for non existing nodes Michael Ellerman <mpe@ellerman.id.au> - 2015-09-22 07:30 +0200
Re: [PATCH V2 2/2] powerpc:numa Do not allocate bootmem memory for non existing nodes Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> - 2015-09-22 12:50 +0200
Re: [PATCH V2 2/2] powerpc:numa Do not allocate bootmem memory for non existing nodes Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> - 2015-09-22 21:40 +0200
| From | Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> |
|---|---|
| Date | 2015-09-15 04:10 +0200 |
| Subject | [PATCH V2 2/2] powerpc:numa Do not allocate bootmem memory for non existing nodes |
| Message-ID | <q8NQZ-7HD-7@gated-at.bofh.it> |
Signed-off-by: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> --- arch/powerpc/mm/numa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 8b9502a..8d8a541 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -80,7 +80,7 @@ static void __init setup_node_to_cpumask_map(void) setup_nr_node_ids(); /* allocate the map */ - for (node = 0; node < nr_node_ids; node++) + for_each_node(node) alloc_bootmem_cpumask_var(&node_to_cpumask_map[node]); /* cpumask_of_node() will now work */ -- 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/
[toc] | [next] | [standalone]
| From | Michael Ellerman <mpe@ellerman.id.au> |
|---|---|
| Date | 2015-09-22 07:30 +0200 |
| Subject | Re: [PATCH V2 2/2] powerpc:numa Do not allocate bootmem memory for non existing nodes |
| Message-ID | <qbojn-4l9-7@gated-at.bofh.it> |
| In reply to | #1224589 |
On Tue, 2015-09-15 at 07:38 +0530, Raghavendra K T wrote: > > ... nothing Sure this patch looks obvious, but please give me a changelog that proves you've thought about it thoroughly. For example is it OK to use for_each_node() at this point in boot? Is there any historical reason why we did it with a hard coded loop? If so what has changed. What systems have you tested on? etc. etc. cheers > Signed-off-by: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> > --- > arch/powerpc/mm/numa.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c > index 8b9502a..8d8a541 100644 > --- a/arch/powerpc/mm/numa.c > +++ b/arch/powerpc/mm/numa.c > @@ -80,7 +80,7 @@ static void __init setup_node_to_cpumask_map(void) > setup_nr_node_ids(); > > /* allocate the map */ > - for (node = 0; node < nr_node_ids; node++) > + for_each_node(node) > alloc_bootmem_cpumask_var(&node_to_cpumask_map[node]); > > /* cpumask_of_node() will now work */ -- 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/
[toc] | [prev] | [next] | [standalone]
| From | Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> |
|---|---|
| Date | 2015-09-22 12:50 +0200 |
| Subject | Re: [PATCH V2 2/2] powerpc:numa Do not allocate bootmem memory for non existing nodes |
| Message-ID | <qbtj4-2Wc-15@gated-at.bofh.it> |
| In reply to | #1229908 |
On 09/22/2015 10:59 AM, Michael Ellerman wrote: > On Tue, 2015-09-15 at 07:38 +0530, Raghavendra K T wrote: >> >> ... nothing > > Sure this patch looks obvious, but please give me a changelog that proves > you've thought about it thoroughly. > > For example is it OK to use for_each_node() at this point in boot? Is there any > historical reason why we did it with a hard coded loop? If so what has changed. > What systems have you tested on? etc. etc. > > cheers Changelog: With the setup_nr_nodes(), we have already initialized node_possible_map. So it is safe to use for_each_node here. There are many places in the kernel that use hardcoded 'for' loop with nr_node_ids, because all other architectures have numa nodes populated serially. That should be reason we had maintained same for powerpc. But since on power we have sparse numa node ids possible, we unnecessarily allocate memory for non existent numa nodes. For e.g., on a system with 0,1,16,17 as numa nodes nr_node_ids=18 and we allocate memory for nodes 2-14. The patch is boot tested on a 4 node tuleta [ confirming with printks ]. that it works as expected. > >> Signed-off-by: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> >> --- >> arch/powerpc/mm/numa.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c >> index 8b9502a..8d8a541 100644 >> --- a/arch/powerpc/mm/numa.c >> +++ b/arch/powerpc/mm/numa.c >> @@ -80,7 +80,7 @@ static void __init setup_node_to_cpumask_map(void) >> setup_nr_node_ids(); >> >> /* allocate the map */ >> - for (node = 0; node < nr_node_ids; node++) >> + for_each_node(node) >> alloc_bootmem_cpumask_var(&node_to_cpumask_map[node]); >> >> /* cpumask_of_node() will now work */ > > > > > -- 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/
[toc] | [prev] | [next] | [standalone]
| From | Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> |
|---|---|
| Date | 2015-09-22 21:40 +0200 |
| Subject | Re: [PATCH V2 2/2] powerpc:numa Do not allocate bootmem memory for non existing nodes |
| Message-ID | <qbBzY-6tc-17@gated-at.bofh.it> |
| In reply to | #1229908 |
* Michael Ellerman <mpe@ellerman.id.au> [2015-09-22 15:29:03]: > On Tue, 2015-09-15 at 07:38 +0530, Raghavendra K T wrote: > > > > ... nothing > > Sure this patch looks obvious, but please give me a changelog that proves > you've thought about it thoroughly. > > For example is it OK to use for_each_node() at this point in boot? Is there any > historical reason why we did it with a hard coded loop? If so what has changed. > What systems have you tested on? etc. etc. > > cheers Hi Michael, resending the patches with the changelog. Please note that the patch is in -mm tree already. ---8<--- From 86ead2520662c362d7b9ebd452ce1c33e156016f Mon Sep 17 00:00:00 2001 From: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> Date: Sun, 6 Sep 2015 12:54:40 +0530 Subject: [PATCH V2 2/2] powerpc:numa Do not allocate bootmem memory for non existing nodes With the setup_nr_nodes(), we have already initialized node_possible_map. So it is safe to use for_each_node here. There are many places in the kernel that use hardcoded 'for' loop with nr_node_ids, because all other architectures have numa nodes populated serially. That should be reason we had maintained the same for powerpc. But, since sparse numa node ids possible on powerpc, we unnecessarily allocate memory for non existent numa nodes. For e.g., on a system with 0,1,16,17 as numa nodes nr_node_ids=18 and we allocate memory for nodes 2-14. This patch we allocate memory for only existing numa nodes. The patch is boot tested on a 4 node tuleta [ confirming with printks ]. that it works as expected. Signed-off-by: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> --- arch/powerpc/mm/numa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 8b9502a..8d8a541 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -80,7 +80,7 @@ static void __init setup_node_to_cpumask_map(void) setup_nr_node_ids(); /* allocate the map */ - for (node = 0; node < nr_node_ids; node++) + for_each_node(node) alloc_bootmem_cpumask_var(&node_to_cpumask_map[node]); /* cpumask_of_node() will now work */ -- 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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web