diff options
author | Minchan Kim <[email protected]> | 2021-06-28 19:42:06 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2021-06-29 10:53:54 -0700 |
commit | 151e084af4946344fe0d021f4110b69edaac1e8d (patch) | |
tree | d5d72812c5eac8c72356b6ec1bbf2f4569f3fd59 | |
parent | 902499937e3a82156dcb5069b6df27640480e204 (diff) |
mm: page_alloc: dump migrate-failed pages only at -EBUSY
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]>
-rw-r--r-- | mm/page_alloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 37ce0c2f3bae..941a75b9fb5a 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -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; } |