mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
thp: transhuge isolate_migratepages()
It's not worth migrating transparent hugepages during compaction. Those hugepages don't create fragmentation. Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> Acked-by: Mel Gorman <mel@csn.ul.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
5d6892407c
commit
bc835011af
@ -295,10 +295,25 @@ static unsigned long isolate_migratepages(struct zone *zone,
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!PageLRU(page))
|
||||
continue;
|
||||
|
||||
/*
|
||||
* PageLRU is set, and lru_lock excludes isolation,
|
||||
* splitting and collapsing (collapsing has already
|
||||
* happened if PageLRU is set).
|
||||
*/
|
||||
if (PageTransHuge(page)) {
|
||||
low_pfn += (1 << compound_order(page)) - 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Try isolate the page */
|
||||
if (__isolate_lru_page(page, ISOLATE_BOTH, 0) != 0)
|
||||
continue;
|
||||
|
||||
VM_BUG_ON(PageTransCompound(page));
|
||||
|
||||
/* Successfully isolated */
|
||||
del_page_from_lru_list(zone, page, page_lru(page));
|
||||
list_add(&page->lru, migratelist);
|
||||
|
Loading…
Reference in New Issue
Block a user