summaryrefslogtreecommitdiff
path: root/include/linux/mmzone.h
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2002-10-29 23:35:53 -0800
committerLinus Torvalds <torvalds@penguin.transmeta.com>2002-10-29 23:35:53 -0800
commita206231bbe6ffb988cdf9fcbdfd98e49abaf4819 (patch)
tree640f23350e83ff491f5cc970e79e9cd619704f6f /include/linux/mmzone.h
parent1d2652dd2c3e942e75dc3137b3cb1774b43ae377 (diff)
[PATCH] hot-n-cold pages: page allocator core
Hot/Cold pages and zone->lock amortisation
Diffstat (limited to 'include/linux/mmzone.h')
-rw-r--r--include/linux/mmzone.h17
1 files changed, 17 insertions, 0 deletions
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.
*/