From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail202.messagelabs.com (mail202.messagelabs.com [216.82.254.227]) by kanga.kvack.org (Postfix) with SMTP id 127366B0085 for ; Tue, 26 Oct 2010 09:11:48 -0400 (EDT) Received: from m2.gw.fujitsu.co.jp ([10.0.50.72]) by fgwmail6.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id o9QDBk6f027570 for (envelope-from kosaki.motohiro@jp.fujitsu.com); Tue, 26 Oct 2010 22:11:46 +0900 Received: from smail (m2 [127.0.0.1]) by outgoing.m2.gw.fujitsu.co.jp (Postfix) with ESMTP id 641E745DE4E for ; Tue, 26 Oct 2010 22:11:46 +0900 (JST) Received: from s2.gw.fujitsu.co.jp (s2.gw.fujitsu.co.jp [10.0.50.92]) by m2.gw.fujitsu.co.jp (Postfix) with ESMTP id 204E045DE4F for ; Tue, 26 Oct 2010 22:11:46 +0900 (JST) Received: from s2.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s2.gw.fujitsu.co.jp (Postfix) with ESMTP id D18541DB803C for ; Tue, 26 Oct 2010 22:11:45 +0900 (JST) Received: from ml14.s.css.fujitsu.com (ml14.s.css.fujitsu.com [10.249.87.104]) by s2.gw.fujitsu.co.jp (Postfix) with ESMTP id 7D71A1DB803A for ; Tue, 26 Oct 2010 22:11:42 +0900 (JST) From: KOSAKI Motohiro Subject: [PATCH 2/2] mm, mem-hotplug: update pcp->stat_threshold when memory hotplug occur In-Reply-To: <20101026221017.B7DF.A69D9226@jp.fujitsu.com> References: <20101026221017.B7DF.A69D9226@jp.fujitsu.com> Message-Id: <20101026221213.B7E2.A69D9226@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Tue, 26 Oct 2010 22:11:41 +0900 (JST) Sender: owner-linux-mm@kvack.org To: LKML , linux-mm , Andrew Morton , David Rientjes , KAMEZAWA Hiroyuki , Mel Gorman , Christoph Lameter Cc: kosaki.motohiro@jp.fujitsu.com List-ID: Currently, cpu hotplug updates pcp->stat_threashold, but memory hotplug doesn't. there is no reason. Signed-off-by: KOSAKI Motohiro Reviewed-by: KAMEZAWA Hiroyuki Acked-by: Mel Gorman Acked-by: Christoph Lameter --- include/linux/vmstat.h | 5 ++++- mm/page_alloc.c | 2 ++ mm/vmstat.c | 5 ++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index eaaea37..1997988 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h @@ -254,6 +254,7 @@ extern void dec_zone_state(struct zone *, enum zone_stat_item); extern void __dec_zone_state(struct zone *, enum zone_stat_item); void refresh_cpu_vm_stats(int); +void refresh_zone_stat_thresholds(void); #else /* CONFIG_SMP */ /* @@ -299,6 +300,8 @@ static inline void __dec_zone_page_state(struct page *page, #define mod_zone_page_state __mod_zone_page_state static inline void refresh_cpu_vm_stats(int cpu) { } -#endif +static inline void refresh_zone_stat_thresholds(void) { } + +#endif /* CONFIG_SMP */ #endif /* _LINUX_VMSTAT_H */ diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 14ee899..410df70 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -51,6 +51,7 @@ #include #include #include +#include #include #include @@ -5014,6 +5015,7 @@ int __meminit init_per_zone_wmark_min(void) if (min_free_kbytes > 65536) min_free_kbytes = 65536; setup_per_zone_wmarks(); + refresh_zone_stat_thresholds(); setup_per_zone_lowmem_reserve(); setup_per_zone_inactive_ratio(); return 0; diff --git a/mm/vmstat.c b/mm/vmstat.c index cd2e42b..b6b7fed 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -133,7 +133,7 @@ static int calculate_threshold(struct zone *zone) /* * Refresh the thresholds for each zone. */ -static void refresh_zone_stat_thresholds(void) +void refresh_zone_stat_thresholds(void) { struct zone *zone; int cpu; @@ -371,7 +371,7 @@ void refresh_cpu_vm_stats(int cpu) atomic_long_add(global_diff[i], &vm_stat[i]); } -#endif +#endif /* CONFIG_SMP */ #ifdef CONFIG_NUMA /* @@ -1059,7 +1059,6 @@ static int __init setup_vmstat(void) #ifdef CONFIG_SMP int cpu; - refresh_zone_stat_thresholds(); register_cpu_notifier(&vmstat_notifier); for_each_online_cpu(cpu) -- 1.6.5.2 -- 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: email@kvack.org