[PATCH 1/5] move ClearPageActive from move_active_pages() to shrink_active_list()

From: KOSAKI Motohiro
Date: Thu Jul 16 2009 - 04:37:44 EST


This patch series are several vmscan cleanups.

===================
Subject: [PATCH] move ClearPageActive from move_active_pages() to shrink_active_list()

The mvoe_active_pages_to_lru() function is called under irq disabled and
ClearPageActive() doesn't need irq disabling.

Then, this patch move it into shrink_active_list().


Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>
---
mm/vmscan.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

Index: b/mm/vmscan.c
===================================================================
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1230,10 +1230,6 @@ static void move_active_pages_to_lru(str
VM_BUG_ON(PageLRU(page));
SetPageLRU(page);

- VM_BUG_ON(!PageActive(page));
- if (!is_active_lru(lru))
- ClearPageActive(page); /* we are de-activating */
-
list_move(&page->lru, &zone->lru[lru].list);
mem_cgroup_add_lru_list(page, lru);
pgmoved++;
@@ -1315,6 +1311,7 @@ static void shrink_active_list(unsigned
}
}

+ ClearPageActive(page); /* we are de-activating */
list_add(&page->lru, &l_inactive);
}



--
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/