page_referenced(page, 0, sc->priority <= 0)) { 
page_referenced(page, 0)) { 
refill_inactive_zone(struct zone *zone, struct scan_control *sc){	int pgmoved;	int pgdeactivate = 0;	int pgscanned;	int nr_pages = sc->nr_to_scan;	LIST_HEAD(l_hold);	/* The pages which were snipped off */	LIST_HEAD(l_inactive);	/* Pages to go onto the inactive_list */	LIST_HEAD(l_active);	/* Pages to go onto the active_list */	struct page *page;	struct pagevec pvec;	int reclaim_mapped = 0;	long mapped_ratio;	long distress;	long swap_tendency;	lru_add_drain();	spin_lock_irq(&zone->lru_lock);	pgmoved = isolate_lru_pages(nr_pages, &zone->active_list,				    &l_hold, &pgscanned);	zone->pages_scanned += pgscanned;	zone->nr_active -= pgmoved;	spin_unlock_irq(&zone->lru_lock);	/*	 * `distress' is a measure of how much trouble we're having reclaiming	 * pages.  0 -> no problems.  100 -> great trouble.	 */	distress = 100 >> zone->prev_priority;	/*	 * The point of this algorithm is to decide when to start reclaiming	 * mapped memory instead of just pagecache.  Work out how much memory	 * is mapped.	 */	mapped_ratio = (sc->nr_mapped * 100) / total_memory;	/*	 * Now decide how much we really want to unmap some pages.  The mapped	 * ratio is downgraded - just because there's a lot of mapped memory	 * doesn't necessarily mean that page reclaim isn't succeeding.	 *	 * The distress ratio is important - we don't want to start going oom.	 *	 * A 100% value of vm_swappiness overrides this algorithm altogether.	 */	swap_tendency = mapped_ratio / 2 + distress + vm_swappiness;	/*	 * Now use this metric to decide whether to start moving mapped memory	 * onto the inactive list.	 */	if (swap_tendency >= 100)		reclaim_mapped = 1;	while (!list_empty(&l_hold)) {		cond_resched();		page = lru_to_page(&l_hold);		list_del(&page->lru);		if (page_mapped(page)) {			if (!reclaim_mapped ||			    (total_swap_pages == 0 && PageAnon(page)) ||			    page_referenced(page, 0, sc->priority <= 0)) {				list_add(&page->lru, &l_active);				continue;			}		}		list_add(&page->lru, &l_inactive);	}	pagevec_init(&pvec, 1);	pgmoved = 0;	spin_lock_irq(&zone->lru_lock);	while (!list_empty(&l_inactive)) {		page = lru_to_page(&l_inactive);		prefetchw_prev_lru_page(page, &l_inactive, flags);		if (TestSetPageLRU(page))			BUG();		if (!TestClearPageActive(page))			BUG();		list_move(&page->lru, &zone->inactive_list);		pgmoved++;		if (!pagevec_add(&pvec, page)) {			zone->nr_inactive += pgmoved;			spin_unlock_irq(&zone->lru_lock);			pgdeactivate += pgmoved;			pgmoved = 0;			if (buffer_heads_over_limit)				pagevec_strip(&pvec);			__pagevec_release(&pvec);			spin_lock_irq(&zone->lru_lock);		}	}	zone->nr_inactive += pgmoved;	pgdeactivate += pgmoved;	if (buffer_heads_over_limit) {		spin_unlock_irq(&zone->lru_lock);		pagevec_strip(&pvec);		spin_lock_irq(&zone->lru_lock);	}	pgmoved = 0;	while (!list_empty(&l_active)) {		page = lru_to_page(&l_active);		prefetchw_prev_lru_page(page, &l_active, flags);		if (TestSetPageLRU(page))			BUG();		BUG_ON(!PageActive(page));		list_move(&page->lru, &zone->active_list);		pgmoved++;		if (!pagevec_add(&pvec, page)) {			zone->nr_active += pgmoved;			pgmoved = 0;			spin_unlock_irq(&zone->lru_lock);			__pagevec_release(&pvec);			spin_lock_irq(&zone->lru_lock);		}	}	zone->nr_active += pgmoved;	spin_unlock_irq(&zone->lru_lock);	pagevec_release(&pvec);	mod_page_state_zone(zone, pgrefill, pgscanned);	mod_page_state(pgdeactivate, pgdeactivate);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/f7b7fd8f3ebbb2810d6893295aa984acd0fd30db/vmscan.c/buggy/mm/vmscan.c