diff options
-rw-r--r-- | include/linux/gfp.h | 2 | ||||
-rw-r--r-- | mm/page_alloc.c | 10 | ||||
-rw-r--r-- | mm/swap.c | 2 |
3 files changed, 5 insertions, 9 deletions
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 557bdad320b6..e5567e6762f3 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -325,7 +325,7 @@ void free_pages_exact(void *virt, size_t size); | |||
325 | 325 | ||
326 | extern void __free_pages(struct page *page, unsigned int order); | 326 | extern void __free_pages(struct page *page, unsigned int order); |
327 | extern void free_pages(unsigned long addr, unsigned int order); | 327 | extern void free_pages(unsigned long addr, unsigned int order); |
328 | extern void free_hot_page(struct page *page); | 328 | extern void free_hot_cold_page(struct page *page, int cold); |
329 | 329 | ||
330 | #define __free_page(page) __free_pages((page), 0) | 330 | #define __free_page(page) __free_pages((page), 0) |
331 | #define free_page(addr) free_pages((addr),0) | 331 | #define free_page(addr) free_pages((addr),0) |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index caa7df60a4a1..80bcee0c5034 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -1074,8 +1074,9 @@ void mark_free_pages(struct zone *zone) | |||
1074 | 1074 | ||
1075 | /* | 1075 | /* |
1076 | * Free a 0-order page | 1076 | * Free a 0-order page |
1077 | * cold == 1 ? free a cold page : free a hot page | ||
1077 | */ | 1078 | */ |
1078 | static void free_hot_cold_page(struct page *page, int cold) | 1079 | void free_hot_cold_page(struct page *page, int cold) |
1079 | { | 1080 | { |
1080 | struct zone *zone = page_zone(page); | 1081 | struct zone *zone = page_zone(page); |
1081 | struct per_cpu_pages *pcp; | 1082 | struct per_cpu_pages *pcp; |
@@ -1135,11 +1136,6 @@ out: | |||
1135 | local_irq_restore(flags); | 1136 | local_irq_restore(flags); |
1136 | } | 1137 | } |
1137 | 1138 | ||
1138 | void free_hot_page(struct page *page) | ||
1139 | { | ||
1140 | free_hot_cold_page(page, 0); | ||
1141 | } | ||
1142 | |||
1143 | /* | 1139 | /* |
1144 | * split_page takes a non-compound higher-order page, and splits it into | 1140 | * split_page takes a non-compound higher-order page, and splits it into |
1145 | * n (1<<order) sub-pages: page[0..n] | 1141 | * n (1<<order) sub-pages: page[0..n] |
@@ -2010,7 +2006,7 @@ void __free_pages(struct page *page, unsigned int order) | |||
2010 | { | 2006 | { |
2011 | if (put_page_testzero(page)) { | 2007 | if (put_page_testzero(page)) { |
2012 | if (order == 0) | 2008 | if (order == 0) |
2013 | free_hot_page(page); | 2009 | free_hot_cold_page(page, 0); |
2014 | else | 2010 | else |
2015 | __free_pages_ok(page, order); | 2011 | __free_pages_ok(page, order); |
2016 | } | 2012 | } |
@@ -55,7 +55,7 @@ static void __page_cache_release(struct page *page) | |||
55 | del_page_from_lru(zone, page); | 55 | del_page_from_lru(zone, page); |
56 | spin_unlock_irqrestore(&zone->lru_lock, flags); | 56 | spin_unlock_irqrestore(&zone->lru_lock, flags); |
57 | } | 57 | } |
58 | free_hot_page(page); | 58 | free_hot_cold_page(page, 0); |
59 | } | 59 | } |
60 | 60 | ||
61 | static void put_compound_page(struct page *page) | 61 | static void put_compound_page(struct page *page) |