kernels/linux-2.4.0/mm/swap.c
/**
 * (de)activate_page - move pages from/to active and inactive lists
 * @page: the page we want to move
 * @nolock - are we already holding the pagemap_lru_lock?
 *
 * Deactivate_page will move an active page to the right
 * inactive list, while activate_page will move a page back
 * from one of the inactive lists to the active list. If
 * called on a page which is not on any of the lists, the
 * page is left alone.
 */


Deactivate_page will move an active page to the right
inactive list, while activate_page will move a page back
from one of the inactive lists to the active list. If
called on a page which is not on any of the lists, the
page is left alone.
Deactivate_page will move an active page to the right inactive list while activate_page will move a page back from one of the inactive lists to the active list . If called on a page which is not on any of the lists the page is left alone .
void deactivate_page_nolock(struct page * page)
{
	int maxcount = (page->buffers ? 3 : 2);
	page->age = 0;
	ClearPageReferenced(page);
	if (PageActive(page) && page_count(page) <= maxcount && !page_ramdisk(page)) {
		del_page_from_active_list(page);
		add_page_to_inactive_dirty_list(page);
	}
}
void deactivate_page_nolock ( struct page * page ) { int maxcount = ( page -> buffers ? 3 : 2 ) ; page -> age = 0 ; ClearPageReferenced ( page ) ; if ( PageActive ( page ) && page_count ( page ) <= maxcount && ! page_ramdisk ( page ) ) { del_page_from_active_list ( page ) ; add_page_to_inactive_dirty_list ( page ) ; } }
(de)activate_page - move pages from/to active and inactive lists
 @page: the page we want to move
 @nolock - are we already holding the pagemap_lru_lock?
( de ) activate_page - move pages from / to active and inactive lists @page : the page we want to move @nolock - are we already holding the pagemap_lru_lock?
/*
	 * One for the cache, one for the extra reference the
	 * caller has and (maybe) one for the buffers.
	 *
	 * This isn't perfect, but works for just about everything.
	 * Besides, as long as we don't move unfreeable pages to the
	 * inactive_clean list it doesn't need to be perfect...
	 */ /*
	 * Don't touch it if it's not on the active list.
	 * (some pages aren't on any list at all)
	 */