public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: make zone_pcp_reset independ on MEMORY_HOTREMOVE
@ 2012-10-23  9:37 Michal Hocko
  2012-10-23 10:14 ` Wen Congyang
  2012-10-23 10:33 ` Yasuaki Ishimatsu
  0 siblings, 2 replies; 4+ messages in thread
From: Michal Hocko @ 2012-10-23  9:37 UTC (permalink / raw)
  To: akpm
  Cc: linux-kernel, linux-mmc, David Rientjes, Jiang Liu, Len Brown,
	Benjamin Herrenschmidt, Paul Mackerras, Christoph Lameter,
	Minchan Kim, KOSAKI Motohiro, Yasuaki Ishimatsu, Dave Hansen,
	Mel Gorman

340175b7 (mm/hotplug: free zone->pageset when a zone becomes empty)
introduced zone_pcp_reset and hided it inside CONFIG_MEMORY_HOTREMOVE.
The function is since 506e5fb7 (memory-hotplug: allocate zone's pcp
before onlining pages) called also called from online_pages which
is called outside CONFIG_MEMORY_HOTREMOVE which causes a linkage error.

The function, although not used outside of MEMORY_{HOTPLUT,HOTREMOVE},
seems like universal enough so let's keep it at its current location
and only remove the HOTREMOVE guard.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Cc: David Rientjes <rientjes@google.com>
Cc: Jiang Liu <liuj97@gmail.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Christoph Lameter <cl@linux.com>
Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Cc: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: Mel Gorman <mel@csn.ul.ie>
---
 mm/page_alloc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index e29912e..30e359c 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5981,7 +5981,6 @@ void __meminit zone_pcp_update(struct zone *zone)
 }
 #endif
 
-#ifdef CONFIG_MEMORY_HOTREMOVE
 void zone_pcp_reset(struct zone *zone)
 {
 	unsigned long flags;
@@ -6001,6 +6000,7 @@ void zone_pcp_reset(struct zone *zone)
 	local_irq_restore(flags);
 }
 
+#ifdef CONFIG_MEMORY_HOTREMOVE
 /*
  * All pages in the range must be isolated before calling this.
  */
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm: make zone_pcp_reset independ on MEMORY_HOTREMOVE
  2012-10-23  9:37 [PATCH] mm: make zone_pcp_reset independ on MEMORY_HOTREMOVE Michal Hocko
@ 2012-10-23 10:14 ` Wen Congyang
  2012-10-23 10:21   ` Michal Hocko
  2012-10-23 10:33 ` Yasuaki Ishimatsu
  1 sibling, 1 reply; 4+ messages in thread
From: Wen Congyang @ 2012-10-23 10:14 UTC (permalink / raw)
  To: Michal Hocko
  Cc: akpm, linux-kernel, linux-mmc, David Rientjes, Jiang Liu,
	Len Brown, Benjamin Herrenschmidt, Paul Mackerras,
	Christoph Lameter, Minchan Kim, KOSAKI Motohiro,
	Yasuaki Ishimatsu, Dave Hansen, Mel Gorman

At 10/23/2012 05:37 PM, Michal Hocko Wrote:
> 340175b7 (mm/hotplug: free zone->pageset when a zone becomes empty)
> introduced zone_pcp_reset and hided it inside CONFIG_MEMORY_HOTREMOVE.
> The function is since 506e5fb7 (memory-hotplug: allocate zone's pcp
> before onlining pages) called also called from online_pages which

This patch is still in -mm tree, and I have received a report from
Liu Yuanhan.

> is called outside CONFIG_MEMORY_HOTREMOVE which causes a linkage error.
> 
> The function, although not used outside of MEMORY_{HOTPLUT,HOTREMOVE},
> seems like universal enough so let's keep it at its current location
> and only remove the HOTREMOVE guard.
> 
> Signed-off-by: Michal Hocko <mhocko@suse.cz>
> Cc: David Rientjes <rientjes@google.com>
> Cc: Jiang Liu <liuj97@gmail.com>
> Cc: Len Brown <len.brown@intel.com>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Christoph Lameter <cl@linux.com>
> Cc: Minchan Kim <minchan.kim@gmail.com>
> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
> Cc: Dave Hansen <dave@linux.vnet.ibm.com>
> Cc: Mel Gorman <mel@csn.ul.ie>
> ---
>  mm/page_alloc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index e29912e..30e359c 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -5981,7 +5981,6 @@ void __meminit zone_pcp_update(struct zone *zone)
>  }
>  #endif
>  
> -#ifdef CONFIG_MEMORY_HOTREMOVE
>  void zone_pcp_reset(struct zone *zone)
>  {
>  	unsigned long flags;
> @@ -6001,6 +6000,7 @@ void zone_pcp_reset(struct zone *zone)
>  	local_irq_restore(flags);
>  }
>  
> +#ifdef CONFIG_MEMORY_HOTREMOVE
>  /*
>   * All pages in the range must be isolated before calling this.
>   */

This patch looks find to me.

Reviewed-by: Wen Congyang <wency@cn.fujitsu.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm: make zone_pcp_reset independ on MEMORY_HOTREMOVE
  2012-10-23 10:14 ` Wen Congyang
@ 2012-10-23 10:21   ` Michal Hocko
  0 siblings, 0 replies; 4+ messages in thread
From: Michal Hocko @ 2012-10-23 10:21 UTC (permalink / raw)
  To: Wen Congyang
  Cc: akpm, linux-kernel, linux-mmc, David Rientjes, Jiang Liu,
	Len Brown, Benjamin Herrenschmidt, Paul Mackerras,
	Christoph Lameter, Minchan Kim, KOSAKI Motohiro,
	Yasuaki Ishimatsu, Dave Hansen, Mel Gorman

On Tue 23-10-12 18:14:28, Wen Congyang wrote:
> At 10/23/2012 05:37 PM, Michal Hocko Wrote:
> > 340175b7 (mm/hotplug: free zone->pageset when a zone becomes empty)
> > introduced zone_pcp_reset and hided it inside CONFIG_MEMORY_HOTREMOVE.
> > The function is since 506e5fb7 (memory-hotplug: allocate zone's pcp
> > before onlining pages) called also called from online_pages which
> 
> This patch is still in -mm tree, and I have received a report from
> Liu Yuanhan.

Yes you are right. I will resend it and ask Andrew to fold it into the
offending patch. Thanks for catching that!

> > is called outside CONFIG_MEMORY_HOTREMOVE which causes a linkage error.
> > 
> > The function, although not used outside of MEMORY_{HOTPLUT,HOTREMOVE},
> > seems like universal enough so let's keep it at its current location
> > and only remove the HOTREMOVE guard.
> > 
> > Signed-off-by: Michal Hocko <mhocko@suse.cz>
> > Cc: David Rientjes <rientjes@google.com>
> > Cc: Jiang Liu <liuj97@gmail.com>
> > Cc: Len Brown <len.brown@intel.com>
> > Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > Cc: Paul Mackerras <paulus@samba.org>
> > Cc: Christoph Lameter <cl@linux.com>
> > Cc: Minchan Kim <minchan.kim@gmail.com>
> > Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> > Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
> > Cc: Dave Hansen <dave@linux.vnet.ibm.com>
> > Cc: Mel Gorman <mel@csn.ul.ie>
> > ---
> >  mm/page_alloc.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> > index e29912e..30e359c 100644
> > --- a/mm/page_alloc.c
> > +++ b/mm/page_alloc.c
> > @@ -5981,7 +5981,6 @@ void __meminit zone_pcp_update(struct zone *zone)
> >  }
> >  #endif
> >  
> > -#ifdef CONFIG_MEMORY_HOTREMOVE
> >  void zone_pcp_reset(struct zone *zone)
> >  {
> >  	unsigned long flags;
> > @@ -6001,6 +6000,7 @@ void zone_pcp_reset(struct zone *zone)
> >  	local_irq_restore(flags);
> >  }
> >  
> > +#ifdef CONFIG_MEMORY_HOTREMOVE
> >  /*
> >   * All pages in the range must be isolated before calling this.
> >   */
> 
> This patch looks find to me.
> 
> Reviewed-by: Wen Congyang <wency@cn.fujitsu.com>
> 

-- 
Michal Hocko
SUSE Labs

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm: make zone_pcp_reset independ on MEMORY_HOTREMOVE
  2012-10-23  9:37 [PATCH] mm: make zone_pcp_reset independ on MEMORY_HOTREMOVE Michal Hocko
  2012-10-23 10:14 ` Wen Congyang
@ 2012-10-23 10:33 ` Yasuaki Ishimatsu
  1 sibling, 0 replies; 4+ messages in thread
From: Yasuaki Ishimatsu @ 2012-10-23 10:33 UTC (permalink / raw)
  To: Michal Hocko
  Cc: akpm, linux-kernel, linux-mmc, David Rientjes, Jiang Liu,
	Len Brown, Benjamin Herrenschmidt, Paul Mackerras,
	Christoph Lameter, Minchan Kim, KOSAKI Motohiro, Dave Hansen,
	Mel Gorman

2012/10/23 18:37, Michal Hocko wrote:
> 340175b7 (mm/hotplug: free zone->pageset when a zone becomes empty)
> introduced zone_pcp_reset and hided it inside CONFIG_MEMORY_HOTREMOVE.
> The function is since 506e5fb7 (memory-hotplug: allocate zone's pcp
> before onlining pages) called also called from online_pages which
> is called outside CONFIG_MEMORY_HOTREMOVE which causes a linkage error.
> 
> The function, although not used outside of MEMORY_{HOTPLUT,HOTREMOVE},
> seems like universal enough so let's keep it at its current location
> and only remove the HOTREMOVE guard.
> 
> Signed-off-by: Michal Hocko <mhocko@suse.cz>
> Cc: David Rientjes <rientjes@google.com>
> Cc: Jiang Liu <liuj97@gmail.com>
> Cc: Len Brown <len.brown@intel.com>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Christoph Lameter <cl@linux.com>
> Cc: Minchan Kim <minchan.kim@gmail.com>
> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>

Looks goot to me.

Reviewd-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>

Thanks,
Yasuki Ishimatsu

> Cc: Dave Hansen <dave@linux.vnet.ibm.com>
> Cc: Mel Gorman <mel@csn.ul.ie>
> ---
>   mm/page_alloc.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index e29912e..30e359c 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -5981,7 +5981,6 @@ void __meminit zone_pcp_update(struct zone *zone)
>   }
>   #endif
>   
> -#ifdef CONFIG_MEMORY_HOTREMOVE
>   void zone_pcp_reset(struct zone *zone)
>   {
>   	unsigned long flags;
> @@ -6001,6 +6000,7 @@ void zone_pcp_reset(struct zone *zone)
>   	local_irq_restore(flags);
>   }
>   
> +#ifdef CONFIG_MEMORY_HOTREMOVE
>   /*
>    * All pages in the range must be isolated before calling this.
>    */
> 



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-10-23 10:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-23  9:37 [PATCH] mm: make zone_pcp_reset independ on MEMORY_HOTREMOVE Michal Hocko
2012-10-23 10:14 ` Wen Congyang
2012-10-23 10:21   ` Michal Hocko
2012-10-23 10:33 ` Yasuaki Ishimatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox