Commit 29d8c59c authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] vmscan: preserve page referenced info in refill_inactive()

From: Nick Piggin <piggin@cyberone.com.au>

If refill_inactive_zone() is running in its dont-reclaim-mapped-memory mode
we are tossing away the referenced infomation on active mapped pages.

So put that info back if we're not going to deactivate the page.
parent b6c1702e
......@@ -662,17 +662,17 @@ refill_inactive_zone(struct zone *zone, const int nr_pages_in,
page = list_entry(l_hold.prev, struct page, lru);
list_del(&page->lru);
if (page_mapped(page)) {
pte_chain_lock(page);
if (page_mapped(page) && page_referenced(page)) {
pte_chain_unlock(page);
if (!reclaim_mapped) {
list_add(&page->lru, &l_active);
continue;
}
pte_chain_lock(page);
if (page_referenced(page)) {
pte_chain_unlock(page);
if (!reclaim_mapped) {
list_add(&page->lru, &l_active);
continue;
}
pte_chain_unlock(page);
}
/*
* FIXME: need to consider page_count(page) here if/when we
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment