summaryrefslogtreecommitdiff
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2014-08-28 19:34:22 +0100
committerJiri Slaby <jslaby@suse.cz>2014-09-26 11:51:52 +0200
commit0a0809a87b57b648be1dec3c311a5bfb34ea3b14 (patch)
tree31eba818b868dfd1a8464639f29bfb61c8f0e66d /mm/page_alloc.c
parentcd5900b2c8e9b9a4c71541d7ec158a3b579cbb67 (diff)
mm: get rid of unnecessary overhead of trace_mm_page_alloc_extfrag()
commit 52c8f6a5aeb0bdd396849ecaa72d96f8175528f5 upstream. 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> Signed-off-by: Mel Gorman <mgorman@suse.de> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
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 8b010ca23361..e285eaca2ba9 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1118,9 +1118,8 @@ __rmqueue_fallback(struct zone *zone, int order, int start_migratetype)
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;
}