The patch titled nommu: fix build breakage has been added to the -mm tree. Its filename is nommu-fix-build-breakage.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: nommu: fix build breakage From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> 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@xxxxxxxxxx> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx> Signed-off-by: Michal Simek <monstr@xxxxxxxxx> Signed-off-by: David Howells <dhowells@xxxxxxxxxx> Cc: Greg Ungerer <gerg@xxxxxxxxxxxx> Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/mm.h | 6 ++++++ include/linux/mm_types.h | 2 +- mm/memory.c | 3 --- 3 files changed, 7 insertions(+), 4 deletions(-) diff -puN include/linux/mm.h~nommu-fix-build-breakage include/linux/mm.h --- a/include/linux/mm.h~nommu-fix-build-breakage +++ a/include/linux/mm.h @@ -971,7 +971,13 @@ static inline void setmax_mm_hiwater_rss *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 -puN include/linux/mm_types.h~nommu-fix-build-breakage include/linux/mm_types.h --- a/include/linux/mm_types.h~nommu-fix-build-breakage +++ a/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 -puN mm/memory.c~nommu-fix-build-breakage mm/memory.c --- a/mm/memory.c~nommu-fix-build-breakage +++ a/mm/memory.c @@ -190,9 +190,6 @@ static void check_sync_rss_stat(struct t { } -void sync_mm_rss(struct task_struct *task, struct mm_struct *mm) -{ -} #endif /* _ Patches currently in -mm which might be from kamezawa.hiroyu@xxxxxxxxxxxxxx are linux-next.patch nommu-fix-build-breakage.patch vfs-introduce-fmode_neg_offset-for-allowing-negative-f_pos.patch devmem-dont-allow-seek-to-last-page.patch drivers-char-memc-cleanups.patch drivers-char-memc-cleanups-fix.patch drivers-char-memc-cleanups-fix-fix.patch cgroup-introduce-cancel_attach.patch cgroup-introduce-coalesce-css_get-and-css_put.patch cgroups-revamp-subsys-array.patch cgroups-subsystem-module-loading-interface.patch cgroups-subsystem-module-loading-interface-fix.patch cgroups-subsystem-module-unloading.patch cgroups-net_cls-as-module.patch cgroups-blkio-subsystem-as-module.patch cgroups-clean-up-cgroup_pidlist_find-a-bit.patch memcg-add-interface-to-move-charge-at-task-migration.patch memcg-move-charges-of-anonymous-page.patch memcg-move-charges-of-anonymous-page-cleanup.patch memcg-improve-performance-in-moving-charge.patch memcg-avoid-oom-during-moving-charge.patch memcg-move-charges-of-anonymous-swap.patch memcg-move-charges-of-anonymous-swap-fix.patch memcg-improve-performance-in-moving-swap-charge.patch memcg-improve-performance-in-moving-swap-charge-fix.patch cgroup-implement-eventfd-based-generic-api-for-notifications.patch cgroup-implement-eventfd-based-generic-api-for-notifications-kconfig-fix.patch cgroup-implement-eventfd-based-generic-api-for-notifications-fixes.patch cgroup-implement-eventfd-based-generic-api-for-notifications-fixes-fix.patch memcg-extract-mem_group_usage-from-mem_cgroup_read.patch memcg-rework-usage-of-stats-by-soft-limit.patch memcg-implement-memory-thresholds.patch memcg-implement-memory-thresholds-checkpatch-fixes.patch memcg-implement-memory-thresholds-checkpatch-fixes-fix.patch memcg-implement-memory-thresholds-check-if-first-threshold-crossed.patch memcg-typo-in-comment-to-mem_cgroup_print_oom_info.patch memcg-use-generic-percpu-instead-of-private-implementation.patch memcg-update-threshold-and-softlimit-at-commit-v2.patch memcg-share-event-counter-rather-than-duplicate-v2.patch memcg-update-memcg_testtxt.patch memcg-handle-panic_on_oom=always-case-v2.patch cgroups-fix-race-between-userspace-and-kernelspace.patch cgroups-add-simple-listener-of-cgroup-events-to-documentation.patch cgroups-add-simple-listener-of-cgroup-events-to-documentation-fix.patch memcg-update-memcg_testtxt-to-describe-memory-thresholds.patch memcg-fix-oom-kill-behavior-v3.patch memcg-fix-oom-kill-behavior-v4.patch memcg-update-maintainer-list.patch sysctl-clean-up-vm-related-variable-declarations.patch sysctl-clean-up-vm-related-variable-declarations-fix.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html