The patch titled Subject: mm, compaction: some tracepoints should be defined only when CONFIG_COMPACTION is set has been added to the -mm tree. Its filename is mm-compaction-some-tracepoints-should-be-defined-only-when-config_compaction-is-set.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-compaction-some-tracepoints-should-be-defined-only-when-config_compaction-is-set.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-compaction-some-tracepoints-should-be-defined-only-when-config_compaction-is-set.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/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Yafang Shao <laoar.shao@xxxxxxxxx> Subject: mm, compaction: some tracepoints should be defined only when CONFIG_COMPACTION is set Only mm_compaction_isolate_{free, migrate}pages may be used when CONFIG_COMPACTION is not set. All others are used only when CONFIG_COMPACTION is set. After this change, if CONFIG_COMPACTION is not set, the tracepoints that only work when CONFIG_COMPACTION is set will not be exposed to userspace. Without this change, they will always be exposed in debugfs whether CONFIG_COMPACTION is set or not. This is an improvement. Link: http://lkml.kernel.org/r/1552440403-11780-1-git-send-email-laoar.shao@xxxxxxxxx Signed-off-by: Yafang Shao <laoar.shao@xxxxxxxxx> Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxxxx> Cc: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- --- a/include/trace/events/compaction.h~mm-compaction-some-tracepoints-should-be-defined-only-when-config_compaction-is-set +++ a/include/trace/events/compaction.h @@ -64,6 +64,7 @@ DEFINE_EVENT(mm_compaction_isolate_templ TP_ARGS(start_pfn, end_pfn, nr_scanned, nr_taken) ); +#ifdef CONFIG_COMPACTION TRACE_EVENT(mm_compaction_migratepages, TP_PROTO(unsigned long nr_all, @@ -132,7 +133,6 @@ TRACE_EVENT(mm_compaction_begin, __entry->sync ? "sync" : "async") ); -#ifdef CONFIG_COMPACTION TRACE_EVENT(mm_compaction_end, TP_PROTO(unsigned long zone_start, unsigned long migrate_pfn, unsigned long free_pfn, unsigned long zone_end, bool sync, @@ -166,7 +166,6 @@ TRACE_EVENT(mm_compaction_end, __entry->sync ? "sync" : "async", __print_symbolic(__entry->status, COMPACTION_STATUS)) ); -#endif TRACE_EVENT(mm_compaction_try_to_compact_pages, @@ -195,7 +194,6 @@ TRACE_EVENT(mm_compaction_try_to_compact __entry->prio) ); -#ifdef CONFIG_COMPACTION DECLARE_EVENT_CLASS(mm_compaction_suitable_template, TP_PROTO(struct zone *zone, @@ -296,7 +294,6 @@ DEFINE_EVENT(mm_compaction_defer_templat TP_ARGS(zone, order) ); -#endif TRACE_EVENT(mm_compaction_kcompactd_sleep, @@ -352,6 +349,7 @@ DEFINE_EVENT(kcompactd_wake_template, mm TP_ARGS(nid, order, classzone_idx) ); +#endif #endif /* _TRACE_COMPACTION_H */ _ Patches currently in -mm which might be from laoar.shao@xxxxxxxxx are mm-vmscan-drop-zone-id-from-kswapd-tracepoints.patch mm-compaction-show-gfp-flag-names-in-try_to_compact_pages-tracepoint.patch mm-compaction-some-tracepoints-should-be-defined-only-when-config_compaction-is-set.patch