]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm-add-free_hot_cold_page_list-helper-v3
authorKonstantin Khlebnikov <khlebnikov@openvz.org>
Thu, 8 Dec 2011 04:38:51 +0000 (15:38 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 13 Dec 2011 06:43:07 +0000 (17:43 +1100)
v3: Always free pages in reverse order.
    The most recently added struct page, the most likely to be hot.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/swap.c

index bd4abc4991e8c45cf82c9a3643f77b0752485d81..67a09a633a09baad606176f0899d94dbeb4d17d4 100644 (file)
--- 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);