[PATCH] mm: vmscan: recompute page status when putting back
From: Hillf Danton
Date: Fri Jan 06 2012 - 09:07:29 EST
If unlikely the given page is isolated from lru list again, its status is
recomputed before putting back to lru list, since the comment says page's
status can change while we move it among lru.
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
Cc: David Rientjes <rientjes@xxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Hillf Danton <dhillf@xxxxxxxxx>
---
--- a/mm/vmscan.c Thu Dec 29 20:20:16 2011
+++ b/mm/vmscan.c Fri Jan 6 21:31:56 2012
@@ -633,12 +633,14 @@ int remove_mapping(struct address_space
void putback_lru_page(struct page *page)
{
int lru;
- int active = !!TestClearPageActive(page);
- int was_unevictable = PageUnevictable(page);
+ int active;
+ int was_unevictable;
VM_BUG_ON(PageLRU(page));
redo:
+ active = !!TestClearPageActive(page);
+ was_unevictable = PageUnevictable(page);
ClearPageUnevictable(page);
if (page_evictable(page, NULL)) {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/