From a5ce78034474cf63f00bb946282fa88b68a89f5a Mon Sep 17 00:00:00 2001 From: Konstantin Khlebnikov Date: Thu, 17 Nov 2011 10:41:22 +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