Merge 5.8-rc1 into android-mainline
Linux 5.8-rc1 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I00f2168bc9b6fd8e48c7c0776088d2c6cb8e1629
This commit is contained in:
@@ -8301,6 +8301,19 @@ struct page *has_unmovable_pages(struct zone *zone, struct page *page,
|
||||
if ((flags & MEMORY_OFFLINE) && PageHWPoison(page))
|
||||
continue;
|
||||
|
||||
/*
|
||||
* We treat all PageOffline() pages as movable when offlining
|
||||
* to give drivers a chance to decrement their reference count
|
||||
* in MEM_GOING_OFFLINE in order to indicate that these pages
|
||||
* can be offlined as there are no direct references anymore.
|
||||
* For actually unmovable PageOffline() where the driver does
|
||||
* not support this, we will fail later when trying to actually
|
||||
* move these pages that still have a reference count > 0.
|
||||
* (false negatives in this function only)
|
||||
*/
|
||||
if ((flags & MEMORY_OFFLINE) && PageOffline(page))
|
||||
continue;
|
||||
|
||||
if (__PageMovable(page) || PageLRU(page))
|
||||
continue;
|
||||
|
||||
@@ -8532,6 +8545,7 @@ done:
|
||||
pfn_max_align_up(end), migratetype);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(alloc_contig_range);
|
||||
|
||||
static int __alloc_contig_pages(unsigned long start_pfn,
|
||||
unsigned long nr_pages, gfp_t gfp_mask)
|
||||
@@ -8647,6 +8661,7 @@ void free_contig_range(unsigned long pfn, unsigned int nr_pages)
|
||||
}
|
||||
WARN(count != 0, "%d pages are still in use!\n", count);
|
||||
}
|
||||
EXPORT_SYMBOL(free_contig_range);
|
||||
|
||||
/*
|
||||
* The zone indicated has a new number of managed_pages; batch sizes and percpu
|
||||
@@ -8719,6 +8734,17 @@ __offline_isolated_pages(unsigned long start_pfn, unsigned long end_pfn)
|
||||
offlined_pages++;
|
||||
continue;
|
||||
}
|
||||
/*
|
||||
* At this point all remaining PageOffline() pages have a
|
||||
* reference count of 0 and can simply be skipped.
|
||||
*/
|
||||
if (PageOffline(page)) {
|
||||
BUG_ON(page_count(page));
|
||||
BUG_ON(PageBuddy(page));
|
||||
pfn++;
|
||||
offlined_pages++;
|
||||
continue;
|
||||
}
|
||||
|
||||
BUG_ON(page_count(page));
|
||||
BUG_ON(!PageBuddy(page));
|
||||
|
Reference in New Issue
Block a user