diff options
author | Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> | 2013-09-11 17:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-11 18:57:19 -0400 |
commit | f92310c1877fc73470bdcd9228758fa3713c191b (patch) | |
tree | 9178b722246f411a60986047784f85d4a83376a9 /mm/page_alloc.c | |
parent | fef903efcf0cb9721f3f2da719daec9bbc26f12b (diff) |
mm/page_alloc.c: fix the value of fallback_migratetype in alloc_extfrag tracepoint()
In the current code, the value of fallback_migratetype that is printed
using the mm_page_alloc_extfrag tracepoint, is the value of the
migratetype *after* it has been set to the preferred migratetype (if the
ownership was changed). Obviously that wouldn't have been the original
intent. (We already have a separate 'change_ownership' field to tell
whether the ownership of the pageblock was changed from the
fallback_migratetype to the preferred type.)
The intent of the fallback_migratetype field is to show the migratetype
from which we borrowed pages in order to satisfy the allocation request.
So fix the code to print that value correctly.
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Cody P Schafer <cody@linux.vnet.ibm.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 | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index b09ce5fe0cd2..2748fc6a9003 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -1101,8 +1101,9 @@ __rmqueue_fallback(struct zone *zone, int order, int start_migratetype) | |||
1101 | is_migrate_cma(migratetype) | 1101 | is_migrate_cma(migratetype) |
1102 | ? migratetype : start_migratetype); | 1102 | ? migratetype : start_migratetype); |
1103 | 1103 | ||
1104 | trace_mm_page_alloc_extfrag(page, order, current_order, | 1104 | trace_mm_page_alloc_extfrag(page, order, |
1105 | start_migratetype, new_type); | 1105 | current_order, start_migratetype, migratetype, |
1106 | new_type == start_migratetype); | ||
1106 | 1107 | ||
1107 | return page; | 1108 | return page; |
1108 | } | 1109 | } |