* [PATCH -mm] mm: Fix memory hotplug + sparsemem build. @ 2007-09-11 7:25 ` Paul Mundt 0 siblings, 0 replies; 22+ messages in thread From: Paul Mundt @ 2007-09-11 7:25 UTC (permalink / raw) To: Andrew Morton; +Cc: linux-kernel, linux-mm Building with CONFIG_MEMORY_HOTPLUG_SPARSE enabled results in: CC mm/memory_hotplug.o mm/memory_hotplug.c: In function 'online_pages': mm/memory_hotplug.c:215: error: 'struct zone' has no member named 'node' make[1]: *** [mm/memory_hotplug.o] Error 1 make: *** [mm] Error 2 Fix it up. Signed-off-by: Paul Mundt <lethal@linux-sh.org> -- mm/memory_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-2.6.23-rc4-mm1.orig/mm/memory_hotplug.c 2007-09-11 15:15:56.000000000 +0900 +++ linux-2.6.23-rc4-mm1/mm/memory_hotplug.c 2007-09-11 16:20:03.000000000 +0900 @@ -212,7 +212,7 @@ zone->present_pages += onlined_pages; zone->zone_pgdat->node_present_pages += onlined_pages; if (onlined_pages) - node_set_state(zone->node, N_HIGH_MEMORY); + node_set_state(zone_to_nid(zone), N_HIGH_MEMORY); setup_per_zone_pages_min(); ^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH -mm] mm: Fix memory hotplug + sparsemem build. @ 2007-09-11 7:25 ` Paul Mundt 0 siblings, 0 replies; 22+ messages in thread From: Paul Mundt @ 2007-09-11 7:25 UTC (permalink / raw) To: Andrew Morton; +Cc: linux-kernel, linux-mm Building with CONFIG_MEMORY_HOTPLUG_SPARSE enabled results in: CC mm/memory_hotplug.o mm/memory_hotplug.c: In function 'online_pages': mm/memory_hotplug.c:215: error: 'struct zone' has no member named 'node' make[1]: *** [mm/memory_hotplug.o] Error 1 make: *** [mm] Error 2 Fix it up. Signed-off-by: Paul Mundt <lethal@linux-sh.org> -- mm/memory_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-2.6.23-rc4-mm1.orig/mm/memory_hotplug.c 2007-09-11 15:15:56.000000000 +0900 +++ linux-2.6.23-rc4-mm1/mm/memory_hotplug.c 2007-09-11 16:20:03.000000000 +0900 @@ -212,7 +212,7 @@ zone->present_pages += onlined_pages; zone->zone_pgdat->node_present_pages += onlined_pages; if (onlined_pages) - node_set_state(zone->node, N_HIGH_MEMORY); + node_set_state(zone_to_nid(zone), N_HIGH_MEMORY); setup_per_zone_pages_min(); -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH -mm] mm: Fix memory hotplug + sparsemem build. 2007-09-11 7:25 ` Paul Mundt @ 2007-09-11 8:18 ` Yasunori Goto -1 siblings, 0 replies; 22+ messages in thread From: Yasunori Goto @ 2007-09-11 8:18 UTC (permalink / raw) To: Paul Mundt, Andrew Morton, linux-kernel, linux-mm > if (onlined_pages) > - node_set_state(zone->node, N_HIGH_MEMORY); > + node_set_state(zone_to_nid(zone), N_HIGH_MEMORY); > > setup_per_zone_pages_min(); Thanks Paul-san. I also have another issue around here. (Kswapd doesn't run on memory less node now. It should run when the node has memory.) I would like to merge them like following if you don't mind. Bye. --- Fix kswapd doesn't run when memory is added on memory-less-node. Fix compile error of zone->node when CONFIG_NUMA is off. Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org> --- mm/memory_hotplug.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) Index: current/mm/memory_hotplug.c =================================================================== --- current.orig/mm/memory_hotplug.c 2007-09-07 18:08:07.000000000 +0900 +++ current/mm/memory_hotplug.c 2007-09-11 17:29:19.000000000 +0900 @@ -211,10 +211,12 @@ int online_pages(unsigned long pfn, unsi online_pages_range); zone->present_pages += onlined_pages; zone->zone_pgdat->node_present_pages += onlined_pages; - if (onlined_pages) - node_set_state(zone->node, N_HIGH_MEMORY); setup_per_zone_pages_min(); + if (onlined_pages){ + kswapd_run(zone_to_nid(zone)); + node_set_state(zone_to_nid(zone), N_HIGH_MEMORY); + } if (need_zonelists_rebuild) build_all_zonelists(); @@ -269,9 +271,6 @@ int add_memory(int nid, u64 start, u64 s if (!pgdat) return -ENOMEM; new_pgdat = 1; - ret = kswapd_run(nid); - if (ret) - goto error; } /* call arch's memory hotadd */ -- Yasunori Goto ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH -mm] mm: Fix memory hotplug + sparsemem build. @ 2007-09-11 8:18 ` Yasunori Goto 0 siblings, 0 replies; 22+ messages in thread From: Yasunori Goto @ 2007-09-11 8:18 UTC (permalink / raw) To: Paul Mundt, Andrew Morton, linux-kernel, linux-mm > if (onlined_pages) > - node_set_state(zone->node, N_HIGH_MEMORY); > + node_set_state(zone_to_nid(zone), N_HIGH_MEMORY); > > setup_per_zone_pages_min(); Thanks Paul-san. I also have another issue around here. (Kswapd doesn't run on memory less node now. It should run when the node has memory.) I would like to merge them like following if you don't mind. Bye. --- Fix kswapd doesn't run when memory is added on memory-less-node. Fix compile error of zone->node when CONFIG_NUMA is off. Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org> --- mm/memory_hotplug.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) Index: current/mm/memory_hotplug.c =================================================================== --- current.orig/mm/memory_hotplug.c 2007-09-07 18:08:07.000000000 +0900 +++ current/mm/memory_hotplug.c 2007-09-11 17:29:19.000000000 +0900 @@ -211,10 +211,12 @@ int online_pages(unsigned long pfn, unsi online_pages_range); zone->present_pages += onlined_pages; zone->zone_pgdat->node_present_pages += onlined_pages; - if (onlined_pages) - node_set_state(zone->node, N_HIGH_MEMORY); setup_per_zone_pages_min(); + if (onlined_pages){ + kswapd_run(zone_to_nid(zone)); + node_set_state(zone_to_nid(zone), N_HIGH_MEMORY); + } if (need_zonelists_rebuild) build_all_zonelists(); @@ -269,9 +271,6 @@ int add_memory(int nid, u64 start, u64 s if (!pgdat) return -ENOMEM; new_pgdat = 1; - ret = kswapd_run(nid); - if (ret) - goto error; } /* call arch's memory hotadd */ -- Yasunori Goto -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH -mm] mm: Fix memory hotplug + sparsemem build. 2007-09-11 8:18 ` Yasunori Goto @ 2007-09-11 8:25 ` Paul Mundt -1 siblings, 0 replies; 22+ messages in thread From: Paul Mundt @ 2007-09-11 8:25 UTC (permalink / raw) To: Yasunori Goto; +Cc: Andrew Morton, linux-kernel, linux-mm Hi Goto-san, On Tue, Sep 11, 2007 at 05:18:01PM +0900, Yasunori Goto wrote: > > if (onlined_pages) > > - node_set_state(zone->node, N_HIGH_MEMORY); > > + node_set_state(zone_to_nid(zone), N_HIGH_MEMORY); > > > > setup_per_zone_pages_min(); > > Thanks Paul-san. > > I also have another issue around here. > (Kswapd doesn't run on memory less node now. It should run when > the node has memory.) > > I would like to merge them like following if you don't mind. > Looks fine to me! ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH -mm] mm: Fix memory hotplug + sparsemem build. @ 2007-09-11 8:25 ` Paul Mundt 0 siblings, 0 replies; 22+ messages in thread From: Paul Mundt @ 2007-09-11 8:25 UTC (permalink / raw) To: Yasunori Goto; +Cc: Andrew Morton, linux-kernel, linux-mm Hi Goto-san, On Tue, Sep 11, 2007 at 05:18:01PM +0900, Yasunori Goto wrote: > > if (onlined_pages) > > - node_set_state(zone->node, N_HIGH_MEMORY); > > + node_set_state(zone_to_nid(zone), N_HIGH_MEMORY); > > > > setup_per_zone_pages_min(); > > Thanks Paul-san. > > I also have another issue around here. > (Kswapd doesn't run on memory less node now. It should run when > the node has memory.) > > I would like to merge them like following if you don't mind. > Looks fine to me! -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH -mm] mm: Fix memory hotplug + sparsemem build. 2007-09-11 8:18 ` Yasunori Goto @ 2007-09-11 9:15 ` Andy Whitcroft -1 siblings, 0 replies; 22+ messages in thread From: Andy Whitcroft @ 2007-09-11 9:15 UTC (permalink / raw) To: Yasunori Goto; +Cc: Paul Mundt, Andrew Morton, linux-kernel, linux-mm On Tue, Sep 11, 2007 at 05:18:01PM +0900, Yasunori Goto wrote: > > if (onlined_pages) > > - node_set_state(zone->node, N_HIGH_MEMORY); > > + node_set_state(zone_to_nid(zone), N_HIGH_MEMORY); > > > > setup_per_zone_pages_min(); > > Thanks Paul-san. > > I also have another issue around here. > (Kswapd doesn't run on memory less node now. It should run when > the node has memory.) > > I would like to merge them like following if you don't mind. > > > Bye. > > --- > > Fix kswapd doesn't run when memory is added on memory-less-node. > Fix compile error of zone->node when CONFIG_NUMA is off. > > Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com> > Signed-off-by: Paul Mundt <lethal@linux-sh.org> > > > --- > mm/memory_hotplug.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > Index: current/mm/memory_hotplug.c > =================================================================== > --- current.orig/mm/memory_hotplug.c 2007-09-07 18:08:07.000000000 +0900 > +++ current/mm/memory_hotplug.c 2007-09-11 17:29:19.000000000 +0900 > @@ -211,10 +211,12 @@ int online_pages(unsigned long pfn, unsi > online_pages_range); > zone->present_pages += onlined_pages; > zone->zone_pgdat->node_present_pages += onlined_pages; > - if (onlined_pages) > - node_set_state(zone->node, N_HIGH_MEMORY); > > setup_per_zone_pages_min(); > + if (onlined_pages){ Nit, needs a space there before the '{'. > + kswapd_run(zone_to_nid(zone)); > + node_set_state(zone_to_nid(zone), N_HIGH_MEMORY); > + } > > if (need_zonelists_rebuild) > build_all_zonelists(); > @@ -269,9 +271,6 @@ int add_memory(int nid, u64 start, u64 s > if (!pgdat) > return -ENOMEM; > new_pgdat = 1; > - ret = kswapd_run(nid); > - if (ret) > - goto error; > } > > /* call arch's memory hotadd */ The problem as I see it is that when we boot the system we start a kswapd on all nodes with memory. If the hot-add adds memory to a pre-existing node with no memory we will not start one and we end up with a node with memory and no kswapd. Bad. As kswapd_run is a no-op when a kswapd already exists this seems a safe way to fix that. Paul's ->zone conversion is obviously correct also. Acked-by: Andy Whitcroft <apw@shadowen.org> -apw ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH -mm] mm: Fix memory hotplug + sparsemem build. @ 2007-09-11 9:15 ` Andy Whitcroft 0 siblings, 0 replies; 22+ messages in thread From: Andy Whitcroft @ 2007-09-11 9:15 UTC (permalink / raw) To: Yasunori Goto; +Cc: Paul Mundt, Andrew Morton, linux-kernel, linux-mm On Tue, Sep 11, 2007 at 05:18:01PM +0900, Yasunori Goto wrote: > > if (onlined_pages) > > - node_set_state(zone->node, N_HIGH_MEMORY); > > + node_set_state(zone_to_nid(zone), N_HIGH_MEMORY); > > > > setup_per_zone_pages_min(); > > Thanks Paul-san. > > I also have another issue around here. > (Kswapd doesn't run on memory less node now. It should run when > the node has memory.) > > I would like to merge them like following if you don't mind. > > > Bye. > > --- > > Fix kswapd doesn't run when memory is added on memory-less-node. > Fix compile error of zone->node when CONFIG_NUMA is off. > > Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com> > Signed-off-by: Paul Mundt <lethal@linux-sh.org> > > > --- > mm/memory_hotplug.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > Index: current/mm/memory_hotplug.c > =================================================================== > --- current.orig/mm/memory_hotplug.c 2007-09-07 18:08:07.000000000 +0900 > +++ current/mm/memory_hotplug.c 2007-09-11 17:29:19.000000000 +0900 > @@ -211,10 +211,12 @@ int online_pages(unsigned long pfn, unsi > online_pages_range); > zone->present_pages += onlined_pages; > zone->zone_pgdat->node_present_pages += onlined_pages; > - if (onlined_pages) > - node_set_state(zone->node, N_HIGH_MEMORY); > > setup_per_zone_pages_min(); > + if (onlined_pages){ Nit, needs a space there before the '{'. > + kswapd_run(zone_to_nid(zone)); > + node_set_state(zone_to_nid(zone), N_HIGH_MEMORY); > + } > > if (need_zonelists_rebuild) > build_all_zonelists(); > @@ -269,9 +271,6 @@ int add_memory(int nid, u64 start, u64 s > if (!pgdat) > return -ENOMEM; > new_pgdat = 1; > - ret = kswapd_run(nid); > - if (ret) > - goto error; > } > > /* call arch's memory hotadd */ The problem as I see it is that when we boot the system we start a kswapd on all nodes with memory. If the hot-add adds memory to a pre-existing node with no memory we will not start one and we end up with a node with memory and no kswapd. Bad. As kswapd_run is a no-op when a kswapd already exists this seems a safe way to fix that. Paul's ->zone conversion is obviously correct also. Acked-by: Andy Whitcroft <apw@shadowen.org> -apw -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH -mm] mm: Fix memory hotplug + sparsemem build. 2007-09-11 9:15 ` Andy Whitcroft @ 2007-09-11 9:37 ` Yasunori Goto -1 siblings, 0 replies; 22+ messages in thread From: Yasunori Goto @ 2007-09-11 9:37 UTC (permalink / raw) To: Andy Whitcroft, Andrew Morton; +Cc: Paul Mundt, linux-kernel, linux-mm > > + if (onlined_pages){ > > Nit, needs a space there before the '{'. Ah, Ok. I attached fixed patch in this mail. > The problem as I see it is that when we boot the system we start a > kswapd on all nodes with memory. If the hot-add adds memory to a > pre-existing node with no memory we will not start one and we end up > with a node with memory and no kswapd. Bad. > > As kswapd_run is a no-op when a kswapd already exists this seems a safe > way to fix that. Paul's ->zone conversion is obviously correct also. > > Acked-by: Andy Whitcroft <apw@shadowen.org> Thanks for your explanation. You mentioned all of my intention correctly. :-) ---- Fix kswapd doesn't run when memory is added on memory-less-node. Fix compile error of zone->node when CONFIG_NUMA is off. Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Andy Whitcroft <apw@shadowen.org> --- mm/memory_hotplug.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) Index: current/mm/memory_hotplug.c =================================================================== --- current.orig/mm/memory_hotplug.c 2007-09-07 18:08:07.000000000 +0900 +++ current/mm/memory_hotplug.c 2007-09-11 17:29:19.000000000 +0900 @@ -211,10 +211,12 @@ int online_pages(unsigned long pfn, unsi online_pages_range); zone->present_pages += onlined_pages; zone->zone_pgdat->node_present_pages += onlined_pages; - if (onlined_pages) - node_set_state(zone->node, N_HIGH_MEMORY); setup_per_zone_pages_min(); + if (onlined_pages) { + kswapd_run(zone_to_nid(zone)); + node_set_state(zone_to_nid(zone), N_HIGH_MEMORY); + } if (need_zonelists_rebuild) build_all_zonelists(); @@ -269,9 +271,6 @@ int add_memory(int nid, u64 start, u64 s if (!pgdat) return -ENOMEM; new_pgdat = 1; - ret = kswapd_run(nid); - if (ret) - goto error; } /* call arch's memory hotadd */ -- Yasunori Goto ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH -mm] mm: Fix memory hotplug + sparsemem build. @ 2007-09-11 9:37 ` Yasunori Goto 0 siblings, 0 replies; 22+ messages in thread From: Yasunori Goto @ 2007-09-11 9:37 UTC (permalink / raw) To: Andy Whitcroft, Andrew Morton; +Cc: Paul Mundt, linux-kernel, linux-mm > > + if (onlined_pages){ > > Nit, needs a space there before the '{'. Ah, Ok. I attached fixed patch in this mail. > The problem as I see it is that when we boot the system we start a > kswapd on all nodes with memory. If the hot-add adds memory to a > pre-existing node with no memory we will not start one and we end up > with a node with memory and no kswapd. Bad. > > As kswapd_run is a no-op when a kswapd already exists this seems a safe > way to fix that. Paul's ->zone conversion is obviously correct also. > > Acked-by: Andy Whitcroft <apw@shadowen.org> Thanks for your explanation. You mentioned all of my intention correctly. :-) ---- Fix kswapd doesn't run when memory is added on memory-less-node. Fix compile error of zone->node when CONFIG_NUMA is off. Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Andy Whitcroft <apw@shadowen.org> --- mm/memory_hotplug.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) Index: current/mm/memory_hotplug.c =================================================================== --- current.orig/mm/memory_hotplug.c 2007-09-07 18:08:07.000000000 +0900 +++ current/mm/memory_hotplug.c 2007-09-11 17:29:19.000000000 +0900 @@ -211,10 +211,12 @@ int online_pages(unsigned long pfn, unsi online_pages_range); zone->present_pages += onlined_pages; zone->zone_pgdat->node_present_pages += onlined_pages; - if (onlined_pages) - node_set_state(zone->node, N_HIGH_MEMORY); setup_per_zone_pages_min(); + if (onlined_pages) { + kswapd_run(zone_to_nid(zone)); + node_set_state(zone_to_nid(zone), N_HIGH_MEMORY); + } if (need_zonelists_rebuild) build_all_zonelists(); @@ -269,9 +271,6 @@ int add_memory(int nid, u64 start, u64 s if (!pgdat) return -ENOMEM; new_pgdat = 1; - ret = kswapd_run(nid); - if (ret) - goto error; } /* call arch's memory hotadd */ -- Yasunori Goto -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH -mm] mm: Fix memory hotplug + sparsemem build. 2007-09-11 9:37 ` Yasunori Goto @ 2007-09-14 1:44 ` Andrew Morton -1 siblings, 0 replies; 22+ messages in thread From: Andrew Morton @ 2007-09-14 1:44 UTC (permalink / raw) To: Yasunori Goto; +Cc: Andy Whitcroft, Paul Mundt, linux-kernel, linux-mm On Tue, 11 Sep 2007 18:37:12 +0900 Yasunori Goto <y-goto@jp.fujitsu.com> wrote: > > > > + if (onlined_pages){ > > > > Nit, needs a space there before the '{'. > > Ah, Ok. I attached fixed patch in this mail. > > > The problem as I see it is that when we boot the system we start a > > kswapd on all nodes with memory. If the hot-add adds memory to a > > pre-existing node with no memory we will not start one and we end up > > with a node with memory and no kswapd. Bad. > > > > As kswapd_run is a no-op when a kswapd already exists this seems a safe > > way to fix that. Paul's ->zone conversion is obviously correct also. > > > > Acked-by: Andy Whitcroft <apw@shadowen.org> > > Thanks for your explanation. > You mentioned all of my intention correctly. :-) > > > ---- > > Fix kswapd doesn't run when memory is added on memory-less-node. > Fix compile error of zone->node when CONFIG_NUMA is off. > > Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com> > Signed-off-by: Paul Mundt <lethal@linux-sh.org> > Acked-by: Andy Whitcroft <apw@shadowen.org> > > > --- > mm/memory_hotplug.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > Index: current/mm/memory_hotplug.c > =================================================================== > --- current.orig/mm/memory_hotplug.c 2007-09-07 18:08:07.000000000 +0900 > +++ current/mm/memory_hotplug.c 2007-09-11 17:29:19.000000000 +0900 > @@ -211,10 +211,12 @@ int online_pages(unsigned long pfn, unsi > online_pages_range); > zone->present_pages += onlined_pages; > zone->zone_pgdat->node_present_pages += onlined_pages; > - if (onlined_pages) > - node_set_state(zone->node, N_HIGH_MEMORY); > > setup_per_zone_pages_min(); > + if (onlined_pages) { > + kswapd_run(zone_to_nid(zone)); > + node_set_state(zone_to_nid(zone), N_HIGH_MEMORY); > + } > > if (need_zonelists_rebuild) > build_all_zonelists(); > @@ -269,9 +271,6 @@ int add_memory(int nid, u64 start, u64 s > if (!pgdat) > return -ENOMEM; > new_pgdat = 1; > - ret = kswapd_run(nid); > - if (ret) > - goto error; > } > > /* call arch's memory hotadd */ > OK, we're getting into a mess here. This patch fixes update-n_high_memory-node-state-for-memory-hotadd.patch, but which patch does update-n_high_memory-node-state-for-memory-hotadd.patch fix? At present I just whacked update-n_high_memory-node-state-for-memory-hotadd.patch at the end of everything, but that was lazy of me and it ends up making a mess. ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH -mm] mm: Fix memory hotplug + sparsemem build. @ 2007-09-14 1:44 ` Andrew Morton 0 siblings, 0 replies; 22+ messages in thread From: Andrew Morton @ 2007-09-14 1:44 UTC (permalink / raw) To: Yasunori Goto; +Cc: Andy Whitcroft, Paul Mundt, linux-kernel, linux-mm On Tue, 11 Sep 2007 18:37:12 +0900 Yasunori Goto <y-goto@jp.fujitsu.com> wrote: > > > > + if (onlined_pages){ > > > > Nit, needs a space there before the '{'. > > Ah, Ok. I attached fixed patch in this mail. > > > The problem as I see it is that when we boot the system we start a > > kswapd on all nodes with memory. If the hot-add adds memory to a > > pre-existing node with no memory we will not start one and we end up > > with a node with memory and no kswapd. Bad. > > > > As kswapd_run is a no-op when a kswapd already exists this seems a safe > > way to fix that. Paul's ->zone conversion is obviously correct also. > > > > Acked-by: Andy Whitcroft <apw@shadowen.org> > > Thanks for your explanation. > You mentioned all of my intention correctly. :-) > > > ---- > > Fix kswapd doesn't run when memory is added on memory-less-node. > Fix compile error of zone->node when CONFIG_NUMA is off. > > Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com> > Signed-off-by: Paul Mundt <lethal@linux-sh.org> > Acked-by: Andy Whitcroft <apw@shadowen.org> > > > --- > mm/memory_hotplug.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > Index: current/mm/memory_hotplug.c > =================================================================== > --- current.orig/mm/memory_hotplug.c 2007-09-07 18:08:07.000000000 +0900 > +++ current/mm/memory_hotplug.c 2007-09-11 17:29:19.000000000 +0900 > @@ -211,10 +211,12 @@ int online_pages(unsigned long pfn, unsi > online_pages_range); > zone->present_pages += onlined_pages; > zone->zone_pgdat->node_present_pages += onlined_pages; > - if (onlined_pages) > - node_set_state(zone->node, N_HIGH_MEMORY); > > setup_per_zone_pages_min(); > + if (onlined_pages) { > + kswapd_run(zone_to_nid(zone)); > + node_set_state(zone_to_nid(zone), N_HIGH_MEMORY); > + } > > if (need_zonelists_rebuild) > build_all_zonelists(); > @@ -269,9 +271,6 @@ int add_memory(int nid, u64 start, u64 s > if (!pgdat) > return -ENOMEM; > new_pgdat = 1; > - ret = kswapd_run(nid); > - if (ret) > - goto error; > } > > /* call arch's memory hotadd */ > OK, we're getting into a mess here. This patch fixes update-n_high_memory-node-state-for-memory-hotadd.patch, but which patch does update-n_high_memory-node-state-for-memory-hotadd.patch fix? At present I just whacked update-n_high_memory-node-state-for-memory-hotadd.patch at the end of everything, but that was lazy of me and it ends up making a mess. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH -mm] mm: Fix memory hotplug + sparsemem build. 2007-09-14 1:44 ` Andrew Morton @ 2007-09-14 2:02 ` Yasunori Goto -1 siblings, 0 replies; 22+ messages in thread From: Yasunori Goto @ 2007-09-14 2:02 UTC (permalink / raw) To: Andrew Morton; +Cc: Andy Whitcroft, Paul Mundt, linux-kernel, linux-mm > On Tue, 11 Sep 2007 18:37:12 +0900 Yasunori Goto <y-goto@jp.fujitsu.com> wrote: > > > > > > > + if (onlined_pages){ > > > > > > Nit, needs a space there before the '{'. > > > > Ah, Ok. I attached fixed patch in this mail. > > > > > The problem as I see it is that when we boot the system we start a > > > kswapd on all nodes with memory. If the hot-add adds memory to a > > > pre-existing node with no memory we will not start one and we end up > > > with a node with memory and no kswapd. Bad. > > > > > > As kswapd_run is a no-op when a kswapd already exists this seems a safe > > > way to fix that. Paul's ->zone conversion is obviously correct also. > > > > > > Acked-by: Andy Whitcroft <apw@shadowen.org> > > > > Thanks for your explanation. > > You mentioned all of my intention correctly. :-) > > > > > > ---- > > > > Fix kswapd doesn't run when memory is added on memory-less-node. > > Fix compile error of zone->node when CONFIG_NUMA is off. > > > > Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com> > > Signed-off-by: Paul Mundt <lethal@linux-sh.org> > > Acked-by: Andy Whitcroft <apw@shadowen.org> > > > > > > --- > > mm/memory_hotplug.c | 9 ++++----- > > 1 file changed, 4 insertions(+), 5 deletions(-) > > > > Index: current/mm/memory_hotplug.c > > =================================================================== > > --- current.orig/mm/memory_hotplug.c 2007-09-07 18:08:07.000000000 +0900 > > +++ current/mm/memory_hotplug.c 2007-09-11 17:29:19.000000000 +0900 > > @@ -211,10 +211,12 @@ int online_pages(unsigned long pfn, unsi > > online_pages_range); > > zone->present_pages += onlined_pages; > > zone->zone_pgdat->node_present_pages += onlined_pages; > > - if (onlined_pages) > > - node_set_state(zone->node, N_HIGH_MEMORY); > > > > setup_per_zone_pages_min(); > > + if (onlined_pages) { > > + kswapd_run(zone_to_nid(zone)); > > + node_set_state(zone_to_nid(zone), N_HIGH_MEMORY); > > + } > > > > if (need_zonelists_rebuild) > > build_all_zonelists(); > > @@ -269,9 +271,6 @@ int add_memory(int nid, u64 start, u64 s > > if (!pgdat) > > return -ENOMEM; > > new_pgdat = 1; > > - ret = kswapd_run(nid); > > - if (ret) > > - goto error; > > } > > > > /* call arch's memory hotadd */ > > > > OK, we're getting into a mess here. This patch fixes > update-n_high_memory-node-state-for-memory-hotadd.patch, but which patch > does update-n_high_memory-node-state-for-memory-hotadd.patch fix? > > At present I just whacked > update-n_high_memory-node-state-for-memory-hotadd.patch at the end of > everything, but that was lazy of me and it ends up making a mess. It is enough. No more patch is necessary for these issues. I already fixed about Andy-san's comment. :-) Thanks. -- Yasunori Goto ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH -mm] mm: Fix memory hotplug + sparsemem build. @ 2007-09-14 2:02 ` Yasunori Goto 0 siblings, 0 replies; 22+ messages in thread From: Yasunori Goto @ 2007-09-14 2:02 UTC (permalink / raw) To: Andrew Morton; +Cc: Andy Whitcroft, Paul Mundt, linux-kernel, linux-mm > On Tue, 11 Sep 2007 18:37:12 +0900 Yasunori Goto <y-goto@jp.fujitsu.com> wrote: > > > > > > > + if (onlined_pages){ > > > > > > Nit, needs a space there before the '{'. > > > > Ah, Ok. I attached fixed patch in this mail. > > > > > The problem as I see it is that when we boot the system we start a > > > kswapd on all nodes with memory. If the hot-add adds memory to a > > > pre-existing node with no memory we will not start one and we end up > > > with a node with memory and no kswapd. Bad. > > > > > > As kswapd_run is a no-op when a kswapd already exists this seems a safe > > > way to fix that. Paul's ->zone conversion is obviously correct also. > > > > > > Acked-by: Andy Whitcroft <apw@shadowen.org> > > > > Thanks for your explanation. > > You mentioned all of my intention correctly. :-) > > > > > > ---- > > > > Fix kswapd doesn't run when memory is added on memory-less-node. > > Fix compile error of zone->node when CONFIG_NUMA is off. > > > > Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com> > > Signed-off-by: Paul Mundt <lethal@linux-sh.org> > > Acked-by: Andy Whitcroft <apw@shadowen.org> > > > > > > --- > > mm/memory_hotplug.c | 9 ++++----- > > 1 file changed, 4 insertions(+), 5 deletions(-) > > > > Index: current/mm/memory_hotplug.c > > =================================================================== > > --- current.orig/mm/memory_hotplug.c 2007-09-07 18:08:07.000000000 +0900 > > +++ current/mm/memory_hotplug.c 2007-09-11 17:29:19.000000000 +0900 > > @@ -211,10 +211,12 @@ int online_pages(unsigned long pfn, unsi > > online_pages_range); > > zone->present_pages += onlined_pages; > > zone->zone_pgdat->node_present_pages += onlined_pages; > > - if (onlined_pages) > > - node_set_state(zone->node, N_HIGH_MEMORY); > > > > setup_per_zone_pages_min(); > > + if (onlined_pages) { > > + kswapd_run(zone_to_nid(zone)); > > + node_set_state(zone_to_nid(zone), N_HIGH_MEMORY); > > + } > > > > if (need_zonelists_rebuild) > > build_all_zonelists(); > > @@ -269,9 +271,6 @@ int add_memory(int nid, u64 start, u64 s > > if (!pgdat) > > return -ENOMEM; > > new_pgdat = 1; > > - ret = kswapd_run(nid); > > - if (ret) > > - goto error; > > } > > > > /* call arch's memory hotadd */ > > > > OK, we're getting into a mess here. This patch fixes > update-n_high_memory-node-state-for-memory-hotadd.patch, but which patch > does update-n_high_memory-node-state-for-memory-hotadd.patch fix? > > At present I just whacked > update-n_high_memory-node-state-for-memory-hotadd.patch at the end of > everything, but that was lazy of me and it ends up making a mess. It is enough. No more patch is necessary for these issues. I already fixed about Andy-san's comment. :-) Thanks. -- Yasunori Goto -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH -mm] mm: Fix memory hotplug + sparsemem build. 2007-09-14 2:02 ` Yasunori Goto @ 2007-09-14 2:41 ` Andrew Morton -1 siblings, 0 replies; 22+ messages in thread From: Andrew Morton @ 2007-09-14 2:41 UTC (permalink / raw) To: Yasunori Goto; +Cc: Andy Whitcroft, Paul Mundt, linux-kernel, linux-mm On Fri, 14 Sep 2007 11:02:43 +0900 Yasunori Goto <y-goto@jp.fujitsu.com> wrote: > > > /* call arch's memory hotadd */ > > > > > > > OK, we're getting into a mess here. This patch fixes > > update-n_high_memory-node-state-for-memory-hotadd.patch, but which patch > > does update-n_high_memory-node-state-for-memory-hotadd.patch fix? > > > > At present I just whacked > > update-n_high_memory-node-state-for-memory-hotadd.patch at the end of > > everything, but that was lazy of me and it ends up making a mess. > > It is enough. No more patch is necessary for these issues. > I already fixed about Andy-san's comment. :-) Now I'm more confused. I have two separeate questions: a) Is the justr-added update-n_high_memory-node-state-for-memory-hotadd-fix.patch still needed? b) Which patch in 2.6.22-rc4-mm1 does update-n_high_memory-node-state-for-memory-hotadd.patch fix? In other words, into which patch should I fold update-n_high_memory-node-state-for-memory-hotadd.patch prior to sending to Linus? (I (usually) get to work this out for myself. Sometimes it is painful). Generally, if people tell me which patch-in-mm their patch is fixing, it really helps. Adrian does this all the time. Thanks. ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH -mm] mm: Fix memory hotplug + sparsemem build. @ 2007-09-14 2:41 ` Andrew Morton 0 siblings, 0 replies; 22+ messages in thread From: Andrew Morton @ 2007-09-14 2:41 UTC (permalink / raw) To: Yasunori Goto; +Cc: Andy Whitcroft, Paul Mundt, linux-kernel, linux-mm On Fri, 14 Sep 2007 11:02:43 +0900 Yasunori Goto <y-goto@jp.fujitsu.com> wrote: > > > /* call arch's memory hotadd */ > > > > > > > OK, we're getting into a mess here. This patch fixes > > update-n_high_memory-node-state-for-memory-hotadd.patch, but which patch > > does update-n_high_memory-node-state-for-memory-hotadd.patch fix? > > > > At present I just whacked > > update-n_high_memory-node-state-for-memory-hotadd.patch at the end of > > everything, but that was lazy of me and it ends up making a mess. > > It is enough. No more patch is necessary for these issues. > I already fixed about Andy-san's comment. :-) Now I'm more confused. I have two separeate questions: a) Is the justr-added update-n_high_memory-node-state-for-memory-hotadd-fix.patch still needed? b) Which patch in 2.6.22-rc4-mm1 does update-n_high_memory-node-state-for-memory-hotadd.patch fix? In other words, into which patch should I fold update-n_high_memory-node-state-for-memory-hotadd.patch prior to sending to Linus? (I (usually) get to work this out for myself. Sometimes it is painful). Generally, if people tell me which patch-in-mm their patch is fixing, it really helps. Adrian does this all the time. Thanks. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH -mm] mm: Fix memory hotplug + sparsemem build. 2007-09-14 2:41 ` Andrew Morton @ 2007-09-14 5:14 ` Yasunori Goto -1 siblings, 0 replies; 22+ messages in thread From: Yasunori Goto @ 2007-09-14 5:14 UTC (permalink / raw) To: Andrew Morton; +Cc: Andy Whitcroft, Paul Mundt, linux-kernel, linux-mm > On Fri, 14 Sep 2007 11:02:43 +0900 Yasunori Goto <y-goto@jp.fujitsu.com> wrote: > > > > > /* call arch's memory hotadd */ > > > > > > > > > > OK, we're getting into a mess here. This patch fixes > > > update-n_high_memory-node-state-for-memory-hotadd.patch, but which patch > > > does update-n_high_memory-node-state-for-memory-hotadd.patch fix? > > > > > > At present I just whacked > > > update-n_high_memory-node-state-for-memory-hotadd.patch at the end of > > > everything, but that was lazy of me and it ends up making a mess. > > > > It is enough. No more patch is necessary for these issues. > > I already fixed about Andy-san's comment. :-) > > Now I'm more confused. I have two separeate questions: > > a) Is the justr-added update-n_high_memory-node-state-for-memory-hotadd-fix.patch > still needed? I'm not sure exact meaning of "just-added". But, update-n_high_memory-node-state-for-memory-hotadd-fix.patch is necessary for 2.6.23-rc4-mm1. > b) Which patch in 2.6.22-rc4-mm1 does 2.6.23-rc4-mm1? > update-n_high_memory-node-state-for-memory-hotadd.patch fix? In other > words, into which patch should I fold > update-n_high_memory-node-state-for-memory-hotadd.patch prior to sending > to Linus? In my understanding, update-n_high_memory-node-state-for-memory-hotadd.patch should be folded with all of memoryless-nodes-xxxxxxxxxxxx.patch. It sets N_HIGH_MEMORY for a new node-with-memory. But if you need specifing of more detail patch, becase N_HIGH_MEMORY is set in memoryless-nodes-introduce-ask-of-nodes-with-memory.patch, I suppose update-n_high_memory-node-state-for-memory-hotadd.patch should be fold with it. update-n_high_memory-node-state-for-memory-hotadd-fix.patch ^^^ is fixes of update-n_high_memory-node-state-for-memory-hotadd.patch and memoryless-nodes-no-need-for-kswapd.patch Is it enough for your question? Or more confuse? > (I (usually) get to work this out for myself. Sometimes it is painful). > > Generally, if people tell me which patch-in-mm their patch is fixing, > it really helps. Adrian does this all the time. Sorry for your confusing... -- Yasunori Goto ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH -mm] mm: Fix memory hotplug + sparsemem build. @ 2007-09-14 5:14 ` Yasunori Goto 0 siblings, 0 replies; 22+ messages in thread From: Yasunori Goto @ 2007-09-14 5:14 UTC (permalink / raw) To: Andrew Morton; +Cc: Andy Whitcroft, Paul Mundt, linux-kernel, linux-mm > On Fri, 14 Sep 2007 11:02:43 +0900 Yasunori Goto <y-goto@jp.fujitsu.com> wrote: > > > > > /* call arch's memory hotadd */ > > > > > > > > > > OK, we're getting into a mess here. This patch fixes > > > update-n_high_memory-node-state-for-memory-hotadd.patch, but which patch > > > does update-n_high_memory-node-state-for-memory-hotadd.patch fix? > > > > > > At present I just whacked > > > update-n_high_memory-node-state-for-memory-hotadd.patch at the end of > > > everything, but that was lazy of me and it ends up making a mess. > > > > It is enough. No more patch is necessary for these issues. > > I already fixed about Andy-san's comment. :-) > > Now I'm more confused. I have two separeate questions: > > a) Is the justr-added update-n_high_memory-node-state-for-memory-hotadd-fix.patch > still needed? I'm not sure exact meaning of "just-added". But, update-n_high_memory-node-state-for-memory-hotadd-fix.patch is necessary for 2.6.23-rc4-mm1. > b) Which patch in 2.6.22-rc4-mm1 does 2.6.23-rc4-mm1? > update-n_high_memory-node-state-for-memory-hotadd.patch fix? In other > words, into which patch should I fold > update-n_high_memory-node-state-for-memory-hotadd.patch prior to sending > to Linus? In my understanding, update-n_high_memory-node-state-for-memory-hotadd.patch should be folded with all of memoryless-nodes-xxxxxxxxxxxx.patch. It sets N_HIGH_MEMORY for a new node-with-memory. But if you need specifing of more detail patch, becase N_HIGH_MEMORY is set in memoryless-nodes-introduce-ask-of-nodes-with-memory.patch, I suppose update-n_high_memory-node-state-for-memory-hotadd.patch should be fold with it. update-n_high_memory-node-state-for-memory-hotadd-fix.patch ^^^ is fixes of update-n_high_memory-node-state-for-memory-hotadd.patch and memoryless-nodes-no-need-for-kswapd.patch Is it enough for your question? Or more confuse? > (I (usually) get to work this out for myself. Sometimes it is painful). > > Generally, if people tell me which patch-in-mm their patch is fixing, > it really helps. Adrian does this all the time. Sorry for your confusing... -- Yasunori Goto -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH -mm] mm: Fix memory hotplug + sparsemem build. 2007-09-14 2:41 ` Andrew Morton @ 2007-09-14 14:09 ` Lee Schermerhorn -1 siblings, 0 replies; 22+ messages in thread From: Lee Schermerhorn @ 2007-09-14 14:09 UTC (permalink / raw) To: Andrew Morton Cc: Yasunori Goto, Andy Whitcroft, Paul Mundt, linux-kernel, linux-mm On Thu, 2007-09-13 at 19:41 -0700, Andrew Morton wrote: > On Fri, 14 Sep 2007 11:02:43 +0900 Yasunori Goto <y-goto@jp.fujitsu.com> wrote: > > > > > /* call arch's memory hotadd */ > > > > > > > > > > OK, we're getting into a mess here. This patch fixes > > > update-n_high_memory-node-state-for-memory-hotadd.patch, but which patch > > > does update-n_high_memory-node-state-for-memory-hotadd.patch fix? > > > > > > At present I just whacked > > > update-n_high_memory-node-state-for-memory-hotadd.patch at the end of > > > everything, but that was lazy of me and it ends up making a mess. > > > > It is enough. No more patch is necessary for these issues. > > I already fixed about Andy-san's comment. :-) > > Now I'm more confused. I have two separeate questions: > > a) Is the justr-added update-n_high_memory-node-state-for-memory-hotadd-fix.patch > still needed? > > b) Which patch in 2.6.22-rc4-mm1 does > update-n_high_memory-node-state-for-memory-hotadd.patch fix? In other > words, into which patch should I fold > update-n_high_memory-node-state-for-memory-hotadd.patch prior to sending > to Linus? Andrew: I originally sent in the "update-n_high_memory..." patch against 23-rc3-mm1 on 27aug to fix a problem that I introduced when I moved the populating of N_HIGH_MEMORY state to free_area_init_nodes(). This would miss setting the "has memory" node state for hot added memory. I never saw any response, but then it ended up in 23-rc4-mm1. This Tuesday, Paul Mundt sent in a patch to fix a build problem with MEMORY_HOTPLUG_SPARSE introduced by my patch. He replaced zone->node with zone_to_nid(zone) in the node_set_state() arguments. The latest patch, from Yasunori-san, I believe, starts kswapd for nodes to which memory has been hot-added. As I understand it, his is needed because the memoryless nodes patch results in no kswapd for memoryless nodes. Does that help? Lee > > (I (usually) get to work this out for myself. Sometimes it is painful). > > Generally, if people tell me which patch-in-mm their patch is fixing, > it really helps. Adrian does this all the time. > > Thanks. > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majordomo@kvack.org. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH -mm] mm: Fix memory hotplug + sparsemem build. @ 2007-09-14 14:09 ` Lee Schermerhorn 0 siblings, 0 replies; 22+ messages in thread From: Lee Schermerhorn @ 2007-09-14 14:09 UTC (permalink / raw) To: Andrew Morton Cc: Yasunori Goto, Andy Whitcroft, Paul Mundt, linux-kernel, linux-mm On Thu, 2007-09-13 at 19:41 -0700, Andrew Morton wrote: > On Fri, 14 Sep 2007 11:02:43 +0900 Yasunori Goto <y-goto@jp.fujitsu.com> wrote: > > > > > /* call arch's memory hotadd */ > > > > > > > > > > OK, we're getting into a mess here. This patch fixes > > > update-n_high_memory-node-state-for-memory-hotadd.patch, but which patch > > > does update-n_high_memory-node-state-for-memory-hotadd.patch fix? > > > > > > At present I just whacked > > > update-n_high_memory-node-state-for-memory-hotadd.patch at the end of > > > everything, but that was lazy of me and it ends up making a mess. > > > > It is enough. No more patch is necessary for these issues. > > I already fixed about Andy-san's comment. :-) > > Now I'm more confused. I have two separeate questions: > > a) Is the justr-added update-n_high_memory-node-state-for-memory-hotadd-fix.patch > still needed? > > b) Which patch in 2.6.22-rc4-mm1 does > update-n_high_memory-node-state-for-memory-hotadd.patch fix? In other > words, into which patch should I fold > update-n_high_memory-node-state-for-memory-hotadd.patch prior to sending > to Linus? Andrew: I originally sent in the "update-n_high_memory..." patch against 23-rc3-mm1 on 27aug to fix a problem that I introduced when I moved the populating of N_HIGH_MEMORY state to free_area_init_nodes(). This would miss setting the "has memory" node state for hot added memory. I never saw any response, but then it ended up in 23-rc4-mm1. This Tuesday, Paul Mundt sent in a patch to fix a build problem with MEMORY_HOTPLUG_SPARSE introduced by my patch. He replaced zone->node with zone_to_nid(zone) in the node_set_state() arguments. The latest patch, from Yasunori-san, I believe, starts kswapd for nodes to which memory has been hot-added. As I understand it, his is needed because the memoryless nodes patch results in no kswapd for memoryless nodes. Does that help? Lee > > (I (usually) get to work this out for myself. Sometimes it is painful). > > Generally, if people tell me which patch-in-mm their patch is fixing, > it really helps. Adrian does this all the time. > > Thanks. > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majordomo@kvack.org. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH -mm] mm: Fix memory hotplug + sparsemem build. 2007-09-14 14:09 ` Lee Schermerhorn @ 2007-09-14 20:51 ` Andrew Morton -1 siblings, 0 replies; 22+ messages in thread From: Andrew Morton @ 2007-09-14 20:51 UTC (permalink / raw) To: Lee Schermerhorn Cc: Yasunori Goto, Andy Whitcroft, Paul Mundt, linux-kernel, linux-mm On Fri, 14 Sep 2007 10:09:27 -0400 Lee Schermerhorn <Lee.Schermerhorn@hp.com> wrote: > I originally sent in the "update-n_high_memory..." patch against > 23-rc3-mm1 on 27aug to fix a problem that I introduced when I moved the > populating of N_HIGH_MEMORY state to free_area_init_nodes(). This would > miss setting the "has memory" node state for hot added memory. I never > saw any response, but then it ended up in 23-rc4-mm1. > > This Tuesday, Paul Mundt sent in a patch to fix a build problem with > MEMORY_HOTPLUG_SPARSE introduced by my patch. He replaced zone->node > with zone_to_nid(zone) in the node_set_state() arguments. > > The latest patch, from Yasunori-san, I believe, starts kswapd for nodes > to which memory has been hot-added. As I understand it, his is needed > because the memoryless nodes patch results in no kswapd for memoryless > nodes. > > Does that help? not really ;) See, when I get some rinky-dink little fix for a patch in -mm I will position that patch immediately after the patch which it is fixing, with a filename which is derived from the fixed patch's name. So when send-to-Linus time comes, I can fold the fixes into the base patch. This practice also keeps the patches in a sensible presentation order, with minimum interdependencies and good git-bisect friendliness. However it sometimes (rarely) takes considerable effort to work out which patch in -mm a particular fix is fixing. That was the case with update-n_high_memory-node-state-for-memory-hotadd.patch. It helps me quite a bit if people tell me which patch they're fixing. Usually they don't and I get to work it out. Usually it's fairly obvious. ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH -mm] mm: Fix memory hotplug + sparsemem build. @ 2007-09-14 20:51 ` Andrew Morton 0 siblings, 0 replies; 22+ messages in thread From: Andrew Morton @ 2007-09-14 20:51 UTC (permalink / raw) To: Lee Schermerhorn Cc: Yasunori Goto, Andy Whitcroft, Paul Mundt, linux-kernel, linux-mm On Fri, 14 Sep 2007 10:09:27 -0400 Lee Schermerhorn <Lee.Schermerhorn@hp.com> wrote: > I originally sent in the "update-n_high_memory..." patch against > 23-rc3-mm1 on 27aug to fix a problem that I introduced when I moved the > populating of N_HIGH_MEMORY state to free_area_init_nodes(). This would > miss setting the "has memory" node state for hot added memory. I never > saw any response, but then it ended up in 23-rc4-mm1. > > This Tuesday, Paul Mundt sent in a patch to fix a build problem with > MEMORY_HOTPLUG_SPARSE introduced by my patch. He replaced zone->node > with zone_to_nid(zone) in the node_set_state() arguments. > > The latest patch, from Yasunori-san, I believe, starts kswapd for nodes > to which memory has been hot-added. As I understand it, his is needed > because the memoryless nodes patch results in no kswapd for memoryless > nodes. > > Does that help? not really ;) See, when I get some rinky-dink little fix for a patch in -mm I will position that patch immediately after the patch which it is fixing, with a filename which is derived from the fixed patch's name. So when send-to-Linus time comes, I can fold the fixes into the base patch. This practice also keeps the patches in a sensible presentation order, with minimum interdependencies and good git-bisect friendliness. However it sometimes (rarely) takes considerable effort to work out which patch in -mm a particular fix is fixing. That was the case with update-n_high_memory-node-state-for-memory-hotadd.patch. It helps me quite a bit if people tell me which patch they're fixing. Usually they don't and I get to work it out. Usually it's fairly obvious. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2007-09-14 20:52 UTC | newest] Thread overview: 22+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-09-11 7:25 [PATCH -mm] mm: Fix memory hotplug + sparsemem build Paul Mundt 2007-09-11 7:25 ` Paul Mundt 2007-09-11 8:18 ` Yasunori Goto 2007-09-11 8:18 ` Yasunori Goto 2007-09-11 8:25 ` Paul Mundt 2007-09-11 8:25 ` Paul Mundt 2007-09-11 9:15 ` Andy Whitcroft 2007-09-11 9:15 ` Andy Whitcroft 2007-09-11 9:37 ` Yasunori Goto 2007-09-11 9:37 ` Yasunori Goto 2007-09-14 1:44 ` Andrew Morton 2007-09-14 1:44 ` Andrew Morton 2007-09-14 2:02 ` Yasunori Goto 2007-09-14 2:02 ` Yasunori Goto 2007-09-14 2:41 ` Andrew Morton 2007-09-14 2:41 ` Andrew Morton 2007-09-14 5:14 ` Yasunori Goto 2007-09-14 5:14 ` Yasunori Goto 2007-09-14 14:09 ` Lee Schermerhorn 2007-09-14 14:09 ` Lee Schermerhorn 2007-09-14 20:51 ` Andrew Morton 2007-09-14 20:51 ` Andrew Morton
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.