From: Mark Huang Date: Sun, 21 Aug 2005 00:24:34 +0000 (+0000) Subject: - remove last vestiges of CKRM X-Git-Tag: before-fedora-2_6_18-1_2239_FC5-vs2_0_2_2-rc6-merge~97 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=ca5c798997801c7e2bda1727ee46aee120146e2b;p=linux-2.6.git - remove last vestiges of CKRM --- diff --git a/mm/vmscan.c b/mm/vmscan.c index 0453c8e7b..2395eeb6e 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -39,7 +39,6 @@ #include - /* possible outcome of pageout() */ typedef enum { /* failed to write page out, page is locked */ @@ -603,8 +602,6 @@ static void shrink_cache(struct zone *zone, struct scan_control *sc) LIST_HEAD(page_list); struct pagevec pvec; int max_scan = sc->nr_to_scan; - struct list_head *inactive_list = &zone->inactive_list; - struct list_head *active_list = &zone->active_list; pagevec_init(&pvec, 1); @@ -646,13 +643,10 @@ static void shrink_cache(struct zone *zone, struct scan_control *sc) if (TestSetPageLRU(page)) BUG(); list_del(&page->lru); - if (PageActive(page)) { - zone->nr_active++; - list_add(&page->lru, active_list); - } else { - zone->nr_inactive++; - list_add(&page->lru, inactive_list); - } + if (PageActive(page)) + add_page_to_active_list(zone, page); + else + add_page_to_inactive_list(zone, page); if (!pagevec_add(&pvec, page)) { spin_unlock_irq(&zone->lru_lock); __pagevec_release(&pvec); @@ -698,8 +692,6 @@ refill_inactive_zone(struct zone *zone, struct scan_control *sc) long mapped_ratio; long distress; long swap_tendency; - struct list_head *active_list = &zone->active_list; - struct list_head *inactive_list = &zone->inactive_list; lru_add_drain(); spin_lock_irq(&zone->lru_lock); @@ -765,7 +757,7 @@ refill_inactive_zone(struct zone *zone, struct scan_control *sc) BUG(); if (!TestClearPageActive(page)) BUG(); - list_move(&page->lru, inactive_list); + list_move(&page->lru, &zone->inactive_list); pgmoved++; if (!pagevec_add(&pvec, page)) { zone->nr_inactive += pgmoved; @@ -793,7 +785,7 @@ refill_inactive_zone(struct zone *zone, struct scan_control *sc) if (TestSetPageLRU(page)) BUG(); BUG_ON(!PageActive(page)); - list_move(&page->lru, active_list); + list_move(&page->lru, &zone->active_list); pgmoved++; if (!pagevec_add(&pvec, page)) { zone->nr_active += pgmoved; @@ -1111,7 +1103,7 @@ scan: shrink_slab(sc.nr_scanned, GFP_KERNEL, lru_pages); sc.nr_reclaimed += reclaim_state->reclaimed_slab; total_reclaimed += sc.nr_reclaimed; - total_scanned += sc.nr_scanned; + total_scanned += sc.nr_scanned; if (zone->all_unreclaimable) continue; if (zone->pages_scanned >= (zone->nr_active +