]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm-add-free_hot_cold_page_list-helper-v3
authorKonstantin Khlebnikov <khlebnikov@openvz.org>
Fri, 2 Dec 2011 03:11:36 +0000 (14:11 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 2 Dec 2011 03:15:29 +0000 (14:15 +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);