diff options
author | Andrea Arcangeli <aarcange@redhat.com> | 2010-11-02 21:46:56 +0100 |
---|---|---|
committer | Andrea Arcangeli <aarcange@redhat.com> | 2010-11-02 20:47:42 +0000 |
commit | a6b25ae6edbd880f4b14f5b07bf4e433d2bfa03d (patch) | |
tree | b4c1fbec17e9a5b351512951a8846ddb7e605bb9 | |
parent | ada597b4e1ecde148d2f369608783edcc950d330 (diff) |
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>
-rw-r--r-- | mm/compaction.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mm/compaction.c b/mm/compaction.c index 4d709ee59013..66bbfeb09550 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -272,10 +272,25 @@ static unsigned long isolate_migratepages(struct zone *zone, if (PageBuddy(page)) 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); |