samples/c/1/swap.c
void add_page_to_unevictable_list(struct page *page)
{
	struct zone *zone = page_zone(page);

	spin_lock_irq(&zone->lru_lock);
	SetPageUnevictable(page);
	SetPageLRU(page);
	add_page_to_lru_list(zone, page, LRU_UNEVICTABLE);
	spin_unlock_irq(&zone->lru_lock);
}
/**
 * add_page_to_unevictable_list - add a page to the unevictable list
 * @page:  the page to be added to the unevictable list
 *
 * Add page directly to its zone's unevictable list.  To avoid races with
 * tasks that might be making the page evictable, through eg. munlock,
 * munmap or exit, while it's not on the lru, we want to add the page
 * while it's locked or otherwise "invisible" to other tasks.  This is
 * difficult to do when using the pagevec cache, so bypass that.
 */
add a page to the unevictable list
@page:  the page to be added to the unevictable list

Add page directly to its zone's unevictable list.  To avoid races with
tasks that might be making the page evictable, through eg. munlock,
munmap or exit, while it's not on the lru, we want to add the page
while it's locked or otherwise "invisible" to other tasks.  This is
difficult to do when using the pagevec cache, so bypass that.
add a page to the unevictable list @page : the page to be added to the unevictable list Add page directly to its zone ' s unevictable list . To avoid races with tasks that might be making the page evictable through eg . munlock munmap or exit while it ' s not on the lru we want to add the page while it ' s locked or otherwise " invisible " to other tasks . This is difficult to do when using the pagevec cache so bypass that .
void add_page_to_unevictable_list(struct page *page)
{
	struct zone *zone = page_zone(page);
	spin_lock_irq(&zone->lru_lock);
	SetPageUnevictable(page);
	SetPageLRU(page);
	add_page_to_lru_list(zone, page, LRU_UNEVICTABLE);
	spin_unlock_irq(&zone->lru_lock);
}
void add_page_to_unevictable_list ( struct page * page ) { struct zone * zone = page_zone ( page ) ; spin_lock_irq ( & zone -> lru_lock ) ; SetPageUnevictable ( page ) ; SetPageLRU ( page ) ; add_page_to_lru_list ( zone , page , LRU_UNEVICTABLE ) ; spin_unlock_irq ( & zone -> lru_lock ) ; }
add_page_to_unevictable_list - add a page to the unevictable list
 @page:  the page to be added to the unevictable list
add_page_to_unevictable_list - add a page to the unevictable list @page : the page to be added to the unevictable list