aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>2010-03-10 18:20:38 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-12 18:52:28 -0500
commit53bddb4e9f3f53df02a783751984ddeade71b085 (patch)
tree74b9dfa0b61d6455a006beb2de20310aee0bc28b /include
parent936ed49a540e2dce645da27e7e4032b24310a8e4 (diff)
nommu: fix build breakage
Commit 34e55232e59f7b19050267a05ff1226e5cd122a5 ("mm: avoid false sharing of mm_counter") added sync_mm_rss() for syncing loosely accounted rss counters. It's for CONFIG_MMU but sync_mm_rss is called even in NOMMU enviroment (kerne/exit.c, fs/exec.c). Above commit doesn't handle it well. This patch changes SPLIT_RSS_COUNTING depends on SPLIT_PTLOCKS && CONFIG_MMU And for avoid unnecessary function calls, sync_mm_rss changed to be inlined noop function in header file. Reported-by: David Howells <dhowells@redhat.com> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: David Howells <dhowells@redhat.com> Cc: Greg Ungerer <gerg@snapgear.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mm.h6
-rw-r--r--include/linux/mm_types.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 3899395a03de..7f693b272c4a 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -971,7 +971,13 @@ static inline void setmax_mm_hiwater_rss(unsigned long *maxrss,
971 *maxrss = hiwater_rss; 971 *maxrss = hiwater_rss;
972} 972}
973 973
974#if defined(SPLIT_RSS_COUNTING)
974void sync_mm_rss(struct task_struct *task, struct mm_struct *mm); 975void sync_mm_rss(struct task_struct *task, struct mm_struct *mm);
976#else
977static inline void sync_mm_rss(struct task_struct *task, struct mm_struct *mm)
978{
979}
980#endif
975 981
976/* 982/*
977 * A callback you can register to apply pressure to ageable caches. 983 * A callback you can register to apply pressure to ageable caches.
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 048b46270aa5..b8bb9a6a1f37 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -203,7 +203,7 @@ enum {
203 NR_MM_COUNTERS 203 NR_MM_COUNTERS
204}; 204};
205 205
206#if USE_SPLIT_PTLOCKS 206#if USE_SPLIT_PTLOCKS && defined(CONFIG_MMU)
207#define SPLIT_RSS_COUNTING 207#define SPLIT_RSS_COUNTING
208struct mm_rss_stat { 208struct mm_rss_stat {
209 atomic_long_t count[NR_MM_COUNTERS]; 209 atomic_long_t count[NR_MM_COUNTERS];