samples/c/0/swap.c
void __pagevec_lru_add(struct pagevec *pvec)
{
	int i;
	struct zone *zone = NULL;

	for (i = 0; i < pagevec_count(pvec); i++) {
		struct page *page = pvec->pages[i];
		struct zone *pagezone = page_zone(page);

		if (pagezone != zone) {
			if (zone)
				spin_unlock_irq(&zone->lru_lock);
			zone = pagezone;
			spin_lock_irq(&zone->lru_lock);
		}
		VM_BUG_ON(PageLRU(page));
		SetPageLRU(page);
		add_page_to_inactive_list(zone, page);
	}
	if (zone)
		spin_unlock_irq(&zone->lru_lock);
	release_pages(pvec->pages, pvec->nr, pvec->cold);
	pagevec_reinit(pvec);
}
/*
 * Add the passed pages to the LRU, then drop the caller's refcount
 * on them.  Reinitialises the caller's pagevec.
 */
Add the passed pages to the LRU, then drop the caller's refcount
on them.  Reinitialises the caller's pagevec.
Add the passed pages to the LRU then drop the caller ' s refcount on them . Reinitialises the caller ' s pagevec .
void __pagevec_lru_add(struct pagevec *pvec)
{
	int i;
	struct zone *zone = NULL;
	for (i = 0; i < pagevec_count(pvec); i++) {
		struct page *page = pvec->pages[i];
		struct zone *pagezone = page_zone(page);
		if (pagezone != zone) {
			if (zone)
				spin_unlock_irq(&zone->lru_lock);
			zone = pagezone;
			spin_lock_irq(&zone->lru_lock);
		}
		VM_BUG_ON(PageLRU(page));
		SetPageLRU(page);
		add_page_to_inactive_list(zone, page);
	}
	if (zone)
		spin_unlock_irq(&zone->lru_lock);
	release_pages(pvec->pages, pvec->nr, pvec->cold);
	pagevec_reinit(pvec);
}
void __pagevec_lru_add ( struct pagevec * pvec ) { int i ; struct zone * zone = NULL ; for ( i = 0 ; i < pagevec_count ( pvec ) ; i ++ ) { struct page * page = pvec -> pages [ i ] ; struct zone * pagezone = page_zone ( page ) ; if ( pagezone != zone ) { if ( zone ) spin_unlock_irq ( & zone -> lru_lock ) ; zone = pagezone ; spin_lock_irq ( & zone -> lru_lock ) ; } VM_BUG_ON ( PageLRU ( page ) ) ; SetPageLRU ( page ) ; add_page_to_inactive_list ( zone , page ) ; } if ( zone ) spin_unlock_irq ( & zone -> lru_lock ) ; release_pages ( pvec -> pages , pvec -> nr , pvec -> cold ) ; pagevec_reinit ( pvec ) ; }
Add the passed pages to the LRU, then drop the caller's refcount
 on them.
Add the passed pages to the LRU then drop the caller ' s refcount on them .