ANDROID: mm: page_pinner: skip marking failure on freeable pages

Sometime, pages are temporarily pinnned during migration and the migration
fails. However, putback_movable_pages will end up freeing them if their
page refcount are 1. Thus, it doesn't need to mark them as failure, which
just consumes page_pinner logbuffer to lose old history.

Bug: 188908895
Signed-off-by: Minchan Kim <minchan@google.com>
Change-Id: I8564b72b212a5095cfe3ba6bf5622a9b62f5b455
This commit is contained in:
Minchan Kim 2021-05-21 11:43:54 -07:00
commit 3a71ca1496

View file

@ -334,6 +334,9 @@ void __page_pinner_mark_migration_failed_pages(struct list_head *page_list)
struct page_ext *page_ext;
list_for_each_entry(page, page_list, lru) {
/* The page will be freed by putback_movable_pages soon */
if (page_count(page) == 1)
continue;
page_ext = lookup_page_ext(page);
if (unlikely(!page_ext))
continue;