diff options
author | Li Hong <lihong.hi@gmail.com> | 2010-03-05 16:41:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-06 14:26:24 -0500 |
commit | f650316c8b80fe61a31b8b575405b37cbf170459 (patch) | |
tree | 6526cb3de41384eeea81e18b640396138371fbb4 /mm/page_alloc.c | |
parent | 76ca542d880ebe59a7a03c1597e73e1ded271857 (diff) |
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>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index a6b17aa4740b..ee37091b191b 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -583,6 +583,7 @@ static void __free_pages_ok(struct page *page, unsigned int order) | |||
583 | int bad = 0; | 583 | int bad = 0; |
584 | int wasMlocked = __TestClearPageMlocked(page); | 584 | int wasMlocked = __TestClearPageMlocked(page); |
585 | 585 | ||
586 | trace_mm_page_free_direct(page, order); | ||
586 | kmemcheck_free_shadow(page, order); | 587 | kmemcheck_free_shadow(page, order); |
587 | 588 | ||
588 | for (i = 0 ; i < (1 << order) ; ++i) | 589 | for (i = 0 ; i < (1 << order) ; ++i) |
@@ -2008,7 +2009,6 @@ void __pagevec_free(struct pagevec *pvec) | |||
2008 | void __free_pages(struct page *page, unsigned int order) | 2009 | void __free_pages(struct page *page, unsigned int order) |
2009 | { | 2010 | { |
2010 | if (put_page_testzero(page)) { | 2011 | if (put_page_testzero(page)) { |
2011 | trace_mm_page_free_direct(page, order); | ||
2012 | if (order == 0) | 2012 | if (order == 0) |
2013 | free_hot_page(page); | 2013 | free_hot_page(page); |
2014 | else | 2014 | else |