Skip to content

Commit

Permalink
mm: page_alloc: dump migrate-failed pages only at -EBUSY
Browse files Browse the repository at this point in the history
alloc_contig_dump_pages() aims for helping debugging page migration
failure by elevated page refcount compared to expected_count.  (for the
detail, please look at migrate_page_move_mapping)

However, -ENOMEM is just the case that system is under memory pressure
state, not relevant with page refcount at all.  Thus, the dumping page
list is not helpful for the debugging point of view.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Minchan Kim <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Cc: Suren Baghdasaryan <[email protected]>
Cc: John Dias <[email protected]>
Cc: Michal Hocko <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
minchank authored and torvalds committed Jun 29, 2021
1 parent 9024999 commit 151e084
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -8800,7 +8800,8 @@ static int __alloc_contig_migrate_range(struct compact_control *cc,

lru_cache_enable();
if (ret < 0) {
alloc_contig_dump_pages(&cc->migratepages);
if (ret == -EBUSY)
alloc_contig_dump_pages(&cc->migratepages);
putback_movable_pages(&cc->migratepages);
return ret;
}
Expand Down

0 comments on commit 151e084

Please sign in to comment.