aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2013-11-12 18:08:19 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-12 22:09:10 -0500
commit52c8f6a5aeb0bdd396849ecaa72d96f8175528f5 (patch)
tree396299d23b3bf478770d4030000851ebd29223cf /mm/page_alloc.c
parent5d0f3f72efb1c1968ce1f56c58f9e3e6495effa6 (diff)
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@jp.fujitsu.com> Acked-by: Mel Gorman <mgorman@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 5a9883614d99..442f1298f9a7 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1103,9 +1103,8 @@ __rmqueue_fallback(struct zone *zone, int order, int start_migratetype)
1103 is_migrate_cma(migratetype) 1103 is_migrate_cma(migratetype)
1104 ? migratetype : start_migratetype); 1104 ? migratetype : start_migratetype);
1105 1105
1106 trace_mm_page_alloc_extfrag(page, order, 1106 trace_mm_page_alloc_extfrag(page, order, current_order,
1107 current_order, start_migratetype, migratetype, 1107 start_migratetype, migratetype, new_type);
1108 new_type == start_migratetype);
1109 1108
1110 return page; 1109 return page;
1111 } 1110 }