From ad9c9cd13fe4850f454a0b35567f7f3889152746 Mon Sep 17 00:00:00 2001 From: Konstantin Khlebnikov Date: Thu, 8 Dec 2011 15:38:51 +1100 Subject: [PATCH] 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 --- mm/swap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.5