aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
authorKonstantin Khlebnikov <khlebnikov@openvz.org>2012-05-29 18:06:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-29 19:22:26 -0400
commit6a18adb35c27848195c938b0779ce882d63d3ed1 (patch)
treee2b187e05b150db55764c8347472452edb50c6d3 /mm/vmscan.c
parent5dc35979e444b50d5551bdeb7a7abc5c69c875d0 (diff)
mm/vmscan: push zone pointer into shrink_page_list()
It doesn't need a pointer to the cgroup - pointer to the zone is enough. This patch also kills the "mz" argument of page_check_references() - it is unused after "mm: memcg: count pte references from every member of the reclaimed hierarch" Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> Cc: Mel Gorman <mel@csn.ul.ie> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Acked-by: Hugh Dickins <hughd@google.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.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index b7d03d7b8f8e..eaa154bd1f84 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -629,7 +629,6 @@ enum page_references {
629}; 629};
630 630
631static enum page_references page_check_references(struct page *page, 631static enum page_references page_check_references(struct page *page,
632 struct mem_cgroup_zone *mz,
633 struct scan_control *sc) 632 struct scan_control *sc)
634{ 633{
635 int referenced_ptes, referenced_page; 634 int referenced_ptes, referenced_page;
@@ -688,7 +687,7 @@ static enum page_references page_check_references(struct page *page,
688 * shrink_page_list() returns the number of reclaimed pages 687 * shrink_page_list() returns the number of reclaimed pages
689 */ 688 */
690static unsigned long shrink_page_list(struct list_head *page_list, 689static unsigned long shrink_page_list(struct list_head *page_list,
691 struct mem_cgroup_zone *mz, 690 struct zone *zone,
692 struct scan_control *sc, 691 struct scan_control *sc,
693 unsigned long *ret_nr_dirty, 692 unsigned long *ret_nr_dirty,
694 unsigned long *ret_nr_writeback) 693 unsigned long *ret_nr_writeback)
@@ -718,7 +717,7 @@ static unsigned long shrink_page_list(struct list_head *page_list,
718 goto keep; 717 goto keep;
719 718
720 VM_BUG_ON(PageActive(page)); 719 VM_BUG_ON(PageActive(page));
721 VM_BUG_ON(page_zone(page) != mz->zone); 720 VM_BUG_ON(page_zone(page) != zone);
722 721
723 sc->nr_scanned++; 722 sc->nr_scanned++;
724 723
@@ -741,7 +740,7 @@ static unsigned long shrink_page_list(struct list_head *page_list,
741 goto keep; 740 goto keep;
742 } 741 }
743 742
744 references = page_check_references(page, mz, sc); 743 references = page_check_references(page, sc);
745 switch (references) { 744 switch (references) {
746 case PAGEREF_ACTIVATE: 745 case PAGEREF_ACTIVATE:
747 goto activate_locked; 746 goto activate_locked;
@@ -931,7 +930,7 @@ keep:
931 * will encounter the same problem 930 * will encounter the same problem
932 */ 931 */
933 if (nr_dirty && nr_dirty == nr_congested && global_reclaim(sc)) 932 if (nr_dirty && nr_dirty == nr_congested && global_reclaim(sc))
934 zone_set_flag(mz->zone, ZONE_CONGESTED); 933 zone_set_flag(zone, ZONE_CONGESTED);
935 934
936 free_hot_cold_page_list(&free_pages, 1); 935 free_hot_cold_page_list(&free_pages, 1);
937 936
@@ -1309,7 +1308,7 @@ shrink_inactive_list(unsigned long nr_to_scan, struct mem_cgroup_zone *mz,
1309 1308
1310 update_isolated_counts(mz, &page_list, &nr_anon, &nr_file); 1309 update_isolated_counts(mz, &page_list, &nr_anon, &nr_file);
1311 1310
1312 nr_reclaimed = shrink_page_list(&page_list, mz, sc, 1311 nr_reclaimed = shrink_page_list(&page_list, zone, sc,
1313 &nr_dirty, &nr_writeback); 1312 &nr_dirty, &nr_writeback);
1314 1313
1315 spin_lock_irq(&zone->lru_lock); 1314 spin_lock_irq(&zone->lru_lock);