aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmzone.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mmzone.h')
-rw-r--r--include/linux/mmzone.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index e530c6c092f1..4733d35d8223 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -63,6 +63,12 @@ struct per_cpu_pageset {
63#endif 63#endif
64} ____cacheline_aligned_in_smp; 64} ____cacheline_aligned_in_smp;
65 65
66#ifdef CONFIG_NUMA
67#define zone_pcp(__z, __cpu) ((__z)->pageset[(__cpu)])
68#else
69#define zone_pcp(__z, __cpu) (&(__z)->pageset[(__cpu)])
70#endif
71
66#define ZONE_DMA 0 72#define ZONE_DMA 0
67#define ZONE_NORMAL 1 73#define ZONE_NORMAL 1
68#define ZONE_HIGHMEM 2 74#define ZONE_HIGHMEM 2
@@ -122,8 +128,11 @@ struct zone {
122 */ 128 */
123 unsigned long lowmem_reserve[MAX_NR_ZONES]; 129 unsigned long lowmem_reserve[MAX_NR_ZONES];
124 130
131#ifdef CONFIG_NUMA
132 struct per_cpu_pageset *pageset[NR_CPUS];
133#else
125 struct per_cpu_pageset pageset[NR_CPUS]; 134 struct per_cpu_pageset pageset[NR_CPUS];
126 135#endif
127 /* 136 /*
128 * free areas of different sizes 137 * free areas of different sizes
129 */ 138 */
@@ -145,6 +154,14 @@ struct zone {
145 int all_unreclaimable; /* All pages pinned */ 154 int all_unreclaimable; /* All pages pinned */
146 155
147 /* 156 /*
157 * Does the allocator try to reclaim pages from the zone as soon
158 * as it fails a watermark_ok() in __alloc_pages?
159 */
160 int reclaim_pages;
161 /* A count of how many reclaimers are scanning this zone */
162 atomic_t reclaim_in_progress;
163
164 /*
148 * prev_priority holds the scanning priority for this zone. It is 165 * prev_priority holds the scanning priority for this zone. It is
149 * defined as the scanning priority at which we achieved our reclaim 166 * defined as the scanning priority at which we achieved our reclaim
150 * target at the previous try_to_free_pages() or balance_pgdat() 167 * target at the previous try_to_free_pages() or balance_pgdat()
@@ -381,7 +398,7 @@ int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, struct file *,
381 398
382#include <linux/topology.h> 399#include <linux/topology.h>
383/* Returns the number of the current Node. */ 400/* Returns the number of the current Node. */
384#define numa_node_id() (cpu_to_node(_smp_processor_id())) 401#define numa_node_id() (cpu_to_node(raw_smp_processor_id()))
385 402
386#ifndef CONFIG_DISCONTIGMEM 403#ifndef CONFIG_DISCONTIGMEM
387 404