aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2009-09-21 20:01:44 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-22 10:17:30 -0400
commit5205e56eeab04ce02f8bb6b47d1569b216bc0b6a (patch)
treeef27909cc2f016ddd7dc6c34fb5a37ca23dcadd3 /mm/vmscan.c
parentde2e7567c7ddf24f0ca80010163ed10da66a14e2 (diff)
vmscan: move ClearPageActive from move_active_pages() to shrink_active_list()
The move_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@jp.fujitsu.com> Reviewed-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Rik van Riel <riel@redhat.com> Cc: Minchan Kim <minchan.kim@gmail.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index ece2ecb08102..ca81d0d05c09 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1278,10 +1278,6 @@ static void move_active_pages_to_lru(struct zone *zone,
1278 VM_BUG_ON(PageLRU(page)); 1278 VM_BUG_ON(PageLRU(page));
1279 SetPageLRU(page); 1279 SetPageLRU(page);
1280 1280
1281 VM_BUG_ON(!PageActive(page));
1282 if (!is_active_lru(lru))
1283 ClearPageActive(page); /* we are de-activating */
1284
1285 list_move(&page->lru, &zone->lru[lru].list); 1281 list_move(&page->lru, &zone->lru[lru].list);
1286 mem_cgroup_add_lru_list(page, lru); 1282 mem_cgroup_add_lru_list(page, lru);
1287 pgmoved++; 1283 pgmoved++;
@@ -1363,6 +1359,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
1363 } 1359 }
1364 } 1360 }
1365 1361
1362 ClearPageActive(page); /* we are de-activating */
1366 list_add(&page->lru, &l_inactive); 1363 list_add(&page->lru, &l_inactive);
1367 } 1364 }
1368 1365