diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/gfp.h | 7 | ||||
| -rw-r--r-- | include/linux/mm.h | 1 | ||||
| -rw-r--r-- | include/linux/mmzone.h | 17 |
3 files changed, 21 insertions, 4 deletions
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index c340b447a963..8e093813e4f7 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -17,6 +17,7 @@ #define __GFP_IO 0x40 /* Can start low memory physical IO? */ #define __GFP_HIGHIO 0x80 /* Can start high mem physical IO? */ #define __GFP_FS 0x100 /* Can call down to low-level FS? */ +#define __GFP_COLD 0x200 /* Cache-cold page required */ #define GFP_NOHIGHIO ( __GFP_WAIT | __GFP_IO) #define GFP_NOIO ( __GFP_WAIT) @@ -32,6 +33,7 @@ #define GFP_DMA __GFP_DMA + /* * There is only one page-allocator function, and two main namespaces to * it. The alloc_page*() variants return 'struct page *' and as such @@ -77,11 +79,10 @@ extern unsigned long FASTCALL(get_zeroed_page(unsigned int gfp_mask)); #define __get_dma_pages(gfp_mask, order) \ __get_free_pages((gfp_mask) | GFP_DMA,(order)) -/* - * There is only one 'core' page-freeing function. - */ extern void FASTCALL(__free_pages(struct page *page, unsigned int order)); extern void FASTCALL(free_pages(unsigned long addr, unsigned int order)); +extern void FASTCALL(free_hot_page(struct page *page)); +extern void FASTCALL(free_cold_page(struct page *page)); #define __free_page(page) __free_pages((page), 0) #define free_page(addr) free_pages((addr),0) diff --git a/include/linux/mm.h b/include/linux/mm.h index cab2c4342047..d9d2f20732d4 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -211,7 +211,6 @@ struct page { #define set_page_count(p,v) atomic_set(&(p)->count, v) extern void FASTCALL(__page_cache_release(struct page *)); -void FASTCALL(__free_pages_ok(struct page *page, unsigned int order)); static inline void put_page(struct page *page) { diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 10c4ee968020..d80490b1265c 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -9,6 +9,7 @@ #include <linux/list.h> #include <linux/wait.h> #include <linux/cache.h> +#include <linux/threads.h> #include <asm/atomic.h> #ifdef CONFIG_DISCONTIGMEM #include <asm/numnodes.h> @@ -46,6 +47,18 @@ struct zone_padding { #define ZONE_PADDING(name) #endif +struct per_cpu_pages { + int count; /* number of pages in the list */ + int low; /* low watermark, refill needed */ + int high; /* high watermark, emptying needed */ + int batch; /* chunk size for buddy add/remove */ + struct list_head list; /* the list of pages */ +}; + +struct per_cpu_pageset { + struct per_cpu_pages pcp[2]; /* 0: hot. 1: cold */ +} ____cacheline_aligned_in_smp; + /* * On machines where it is needed (eg PCs) we divide physical memory * into multiple physical zones. On a PC we have 3 zones: @@ -107,6 +120,10 @@ struct zone { unsigned long wait_table_size; unsigned long wait_table_bits; + ZONE_PADDING(_pad3_) + + struct per_cpu_pageset pageset[NR_CPUS]; + /* * Discontig memory support fields. */ |
