All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: page_alloc: dump migrate-failed pages only at -EBUSY
@ 2021-05-19 21:33 Minchan Kim
  2021-05-20 19:19 ` Minchan Kim
  0 siblings, 1 reply; 7+ messages in thread
From: Minchan Kim @ 2021-05-19 21:33 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Suren Baghdasaryan, John Dias, Michal Hocko, David Hildenbrand,
	LKML, linux-mm, Minchan Kim

alloc_contig_dump_pages aims for helping debugging page migration
failure by page refcount mismatch or something else of page itself
from migration handler function. However, in -ENOMEM case, there is
nothing to get clue from page descriptor information so just
dump pages only when -EBUSY happens.

Signed-off-by: Minchan Kim <minchan@kernel.org>
---
 mm/page_alloc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 3100fcb08500..c0a2971dc755 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -8760,7 +8760,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;
 	}
-- 
2.31.1.751.gd2f1c929bd-goog


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-05-23 12:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19 21:33 [PATCH] mm: page_alloc: dump migrate-failed pages only at -EBUSY Minchan Kim
2021-05-20 19:19 ` Minchan Kim
2021-05-20 19:28   ` David Hildenbrand
2021-05-20 20:51     ` Minchan Kim
2021-05-21  8:08       ` David Hildenbrand
2021-05-21 17:39         ` Minchan Kim
2021-05-23 12:06           ` David Hildenbrand

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.