aboutsummaryrefslogtreecommitdiffstats
path: root/mm/compaction.c
diff options
context:
space:
mode:
authorJoonsoo Kim <iamjoonsoo.kim@lge.com>2015-02-11 18:27:04 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-11 20:06:04 -0500
commite34d85f0e3c60f7226e5589898b7c7c5cd2a4f02 (patch)
tree84b0daa5ee68e08134f6309a45f7106c463decbd /mm/compaction.c
parent16c4a097a035c01809aa0c0abd458ca1fe4ff3d0 (diff)
mm/compaction: print current range where compaction work
It'd be useful to know current range where compaction work for detailed analysis. With it, we can know pageblock where we actually scan and isolate, and, how much pages we try in that pageblock and can guess why it doesn't become freepage with pageblock order roughly. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Mel Gorman <mgorman@suse.de> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/compaction.c')
-rw-r--r--mm/compaction.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/mm/compaction.c b/mm/compaction.c
index 66f7c365e888..b12df9fe10b4 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -430,11 +430,12 @@ isolate_fail:
430 430
431 } 431 }
432 432
433 trace_mm_compaction_isolate_freepages(*start_pfn, blockpfn,
434 nr_scanned, total_isolated);
435
433 /* Record how far we have got within the block */ 436 /* Record how far we have got within the block */
434 *start_pfn = blockpfn; 437 *start_pfn = blockpfn;
435 438
436 trace_mm_compaction_isolate_freepages(nr_scanned, total_isolated);
437
438 /* 439 /*
439 * If strict isolation is requested by CMA then check that all the 440 * If strict isolation is requested by CMA then check that all the
440 * pages requested were isolated. If there were any failures, 0 is 441 * pages requested were isolated. If there were any failures, 0 is
@@ -590,6 +591,7 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn,
590 unsigned long flags = 0; 591 unsigned long flags = 0;
591 bool locked = false; 592 bool locked = false;
592 struct page *page = NULL, *valid_page = NULL; 593 struct page *page = NULL, *valid_page = NULL;
594 unsigned long start_pfn = low_pfn;
593 595
594 /* 596 /*
595 * Ensure that there are not too many pages isolated from the LRU 597 * Ensure that there are not too many pages isolated from the LRU
@@ -750,7 +752,8 @@ isolate_success:
750 if (low_pfn == end_pfn) 752 if (low_pfn == end_pfn)
751 update_pageblock_skip(cc, valid_page, nr_isolated, true); 753 update_pageblock_skip(cc, valid_page, nr_isolated, true);
752 754
753 trace_mm_compaction_isolate_migratepages(nr_scanned, nr_isolated); 755 trace_mm_compaction_isolate_migratepages(start_pfn, low_pfn,
756 nr_scanned, nr_isolated);
754 757
755 count_compact_events(COMPACTMIGRATE_SCANNED, nr_scanned); 758 count_compact_events(COMPACTMIGRATE_SCANNED, nr_scanned);
756 if (nr_isolated) 759 if (nr_isolated)