From: Konstantin Khlebnikov Date: Thu, 8 Dec 2011 04:38:51 +0000 (+1100) Subject: mm-add-free_hot_cold_page_list-helper-v3 X-Git-Tag: next-20111214~2^2~163 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ad9c9cd13fe4850f454a0b35567f7f3889152746;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);