Skip to content

Commit

Permalink
vmscan: move ClearPageActive from move_active_pages() to shrink_activ…
Browse files Browse the repository at this point in the history
…e_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>
  • Loading branch information
kosaki authored and torvalds committed Sep 22, 2009
1 parent de2e756 commit 5205e56
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1278,10 +1278,6 @@ static void move_active_pages_to_lru(struct zone *zone,
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++;
Expand Down Expand Up @@ -1363,6 +1359,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
}
}

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

Expand Down

0 comments on commit 5205e56

Please sign in to comment.