Commit f650316c8b80fe61a31b8b575405b37cbf170459
Committed by
Linus Torvalds
1 parent
76ca542d88
Exists in
master
and in
4 other branches
mm/page_alloc.c: remove duplicate call to trace_mm_page_free_direct
trace_mm_page_free_direct() is called in function __free_pages(). But it is called again in free_hot_page() if order == 0 and produce duplicate records in trace file for mm_page_free_direct event. As below: K-PID CPU# TIMESTAMP FUNCTION gnome-terminal-1567 [000] 4415.246466: mm_page_free_direct: page=ffffea0003db9f40 pfn=1155800 order=0 gnome-terminal-1567 [000] 4415.246468: mm_page_free_direct: page=ffffea0003db9f40 pfn=1155800 order=0 gnome-terminal-1567 [000] 4415.246506: mm_page_alloc: page=ffffea0003db9f40 pfn=1155800 order=0 migratetype=0 gfp_flags=GFP_KERNEL gnome-terminal-1567 [000] 4415.255557: mm_page_free_direct: page=ffffea0003db9f40 pfn=1155800 order=0 gnome-terminal-1567 [000] 4415.255557: mm_page_free_direct: page=ffffea0003db9f40 pfn=1155800 order=0 This patch removes the first call and adds a call to trace_mm_page_free_direct() in __free_pages_ok(). Signed-off-by: Li Hong <lihong.hi@gmail.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Rik van Riel <riel@redhat.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Larry Woodman <lwoodman@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Li Ming Chun <macli@brc.ubc.ca> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
mm/page_alloc.c
... | ... | @@ -583,6 +583,7 @@ |
583 | 583 | int bad = 0; |
584 | 584 | int wasMlocked = __TestClearPageMlocked(page); |
585 | 585 | |
586 | + trace_mm_page_free_direct(page, order); | |
586 | 587 | kmemcheck_free_shadow(page, order); |
587 | 588 | |
588 | 589 | for (i = 0 ; i < (1 << order) ; ++i) |
... | ... | @@ -2008,7 +2009,6 @@ |
2008 | 2009 | void __free_pages(struct page *page, unsigned int order) |
2009 | 2010 | { |
2010 | 2011 | if (put_page_testzero(page)) { |
2011 | - trace_mm_page_free_direct(page, order); | |
2012 | 2012 | if (order == 0) |
2013 | 2013 | free_hot_page(page); |
2014 | 2014 | else |