From: Konstantin Khlebnikov Date: Fri, 2 Dec 2011 03:11:36 +0000 (+1100) Subject: mm-add-free_hot_cold_page_list-helper-v3 X-Git-Tag: next-20111206~1^2~167 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=634aadb71f90fd59e579a40ff7982d44990855fb;p=karo-tx-linux.git mm-add-free_hot_cold_page_list-helper-v3 v3: Always free pages in reverse order. The most recently added struct page, the most likely to be hot. Signed-off-by: Konstantin Khlebnikov Cc: Mel Gorman Cc: KOSAKI Motohiro Cc: Minchan Kim Cc: Hugh Dickins Signed-off-by: Andrew Morton --- diff --git a/mm/swap.c b/mm/swap.c index bd4abc4991e8..67a09a633a09 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -619,7 +619,7 @@ void release_pages(struct page **pages, int nr, int cold) del_page_from_lru(zone, page); } - list_add_tail(&page->lru, &pages_to_free); + list_add(&page->lru, &pages_to_free); } if (zone) spin_unlock_irqrestore(&zone->lru_lock, flags);