Subject: + mm-get-rid-of-unnecessary-overhead-of-trace_mm_page_alloc_extfrag.patch added to -mm tree To: kosaki.motohiro@xxxxxxxxxxxxxx,mgorman@xxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Wed, 30 Oct 2013 15:50:34 -0700 The patch titled Subject: mm: get rid of unnecessary overhead of trace_mm_page_alloc_extfrag() has been added to the -mm tree. Its filename is mm-get-rid-of-unnecessary-overhead-of-trace_mm_page_alloc_extfrag.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-get-rid-of-unnecessary-overhead-of-trace_mm_page_alloc_extfrag.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-get-rid-of-unnecessary-overhead-of-trace_mm_page_alloc_extfrag.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 *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx> Subject: mm: get rid of unnecessary overhead of trace_mm_page_alloc_extfrag() In general, every tracepoint should be zero overhead if it is disabled. However, trace_mm_page_alloc_extfrag() is one of exception. It evaluate "new_type == start_migratetype" even if tracepoint is disabled. However, the code can be moved into tracepoint's TP_fast_assign() and TP_fast_assign exist exactly such purpose. This patch does it. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx> Acked-by: Mel Gorman <mgorman@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/trace/events/kmem.h | 10 ++++------ mm/page_alloc.c | 5 ++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff -puN include/trace/events/kmem.h~mm-get-rid-of-unnecessary-overhead-of-trace_mm_page_alloc_extfrag include/trace/events/kmem.h --- a/include/trace/events/kmem.h~mm-get-rid-of-unnecessary-overhead-of-trace_mm_page_alloc_extfrag +++ a/include/trace/events/kmem.h @@ -267,14 +267,12 @@ DEFINE_EVENT_PRINT(mm_page, mm_page_pcpu TRACE_EVENT(mm_page_alloc_extfrag, TP_PROTO(struct page *page, - int alloc_order, int fallback_order, - int alloc_migratetype, int fallback_migratetype, - int change_ownership), + int alloc_order, int fallback_order, + int alloc_migratetype, int fallback_migratetype, int new_migratetype), TP_ARGS(page, alloc_order, fallback_order, - alloc_migratetype, fallback_migratetype, - change_ownership), + alloc_migratetype, fallback_migratetype, new_migratetype), TP_STRUCT__entry( __field( struct page *, page ) @@ -291,7 +289,7 @@ TRACE_EVENT(mm_page_alloc_extfrag, __entry->fallback_order = fallback_order; __entry->alloc_migratetype = alloc_migratetype; __entry->fallback_migratetype = fallback_migratetype; - __entry->change_ownership = change_ownership; + __entry->change_ownership = (new_migratetype == alloc_migratetype); ), TP_printk("page=%p pfn=%lu alloc_order=%d fallback_order=%d pageblock_order=%d alloc_migratetype=%d fallback_migratetype=%d fragmenting=%d change_ownership=%d", diff -puN mm/page_alloc.c~mm-get-rid-of-unnecessary-overhead-of-trace_mm_page_alloc_extfrag mm/page_alloc.c --- a/mm/page_alloc.c~mm-get-rid-of-unnecessary-overhead-of-trace_mm_page_alloc_extfrag +++ a/mm/page_alloc.c @@ -1103,9 +1103,8 @@ __rmqueue_fallback(struct zone *zone, in is_migrate_cma(migratetype) ? migratetype : start_migratetype); - trace_mm_page_alloc_extfrag(page, order, - current_order, start_migratetype, migratetype, - new_type == start_migratetype); + trace_mm_page_alloc_extfrag(page, order, current_order, + start_migratetype, migratetype, new_type); return page; } _ Patches currently in -mm which might be from kosaki.motohiro@xxxxxxxxxxxxxx are mm-mempolicy-make-mpol_to_str-robust-and-always-succeed.patch mm-vmalloc-dont-set-area-caller-twice.patch mm-vmalloc-fix-show-vmap_area-information-race-with-vmap_area-tear-down.patch mm-vmalloc-revert-mm-vmallocc-check-vm_uninitialized-flag-in-s_show-instead-of-show_numa_info.patch revert-mm-vmallocc-emit-the-failure-message-before-return.patch mm-mempolicy-use-numa_no_node.patch mm-fix-page_group_by_mobility_disabled-breakage.patch mm-get-rid-of-unnecessary-overhead-of-trace_mm_page_alloc_extfrag.patch linux-next.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