diff --git a/include/linux/mm.h b/include/linux/mm.h index 3899395a03dea678551ed6a0a365b26d03088b6d..7f693b272c4a2ceb4f675ce4477c3284fef0c2ae 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, *maxrss = hiwater_rss; } +#if defined(SPLIT_RSS_COUNTING) void sync_mm_rss(struct task_struct *task, struct mm_struct *mm); +#else +static inline void sync_mm_rss(struct task_struct *task, struct mm_struct *mm) +{ +} +#endif /* * 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 048b46270aa5220c8c70b1cf2637b1c8402bed32..b8bb9a6a1f37b71cae90c33ff84e75d2d780226a 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -203,7 +203,7 @@ enum { NR_MM_COUNTERS }; -#if USE_SPLIT_PTLOCKS +#if USE_SPLIT_PTLOCKS && defined(CONFIG_MMU) #define SPLIT_RSS_COUNTING struct mm_rss_stat { atomic_long_t count[NR_MM_COUNTERS]; diff --git a/mm/memory.c b/mm/memory.c index d1153e37e9baff33ecc7a6ce26e99133b92b4c66..3d9130bd95d03fed593492b4dd041b768201db14 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -190,9 +190,6 @@ static void check_sync_rss_stat(struct task_struct *task) { } -void sync_mm_rss(struct task_struct *task, struct mm_struct *mm) -{ -} #endif /*