diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mmzone.h | 11 | ||||
-rw-r--r-- | include/linux/page-flags.h | 38 |
2 files changed, 35 insertions, 14 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 0d1a5981bb94..8d6caa414c4c 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -397,6 +397,7 @@ static inline int is_normal_idx(int idx) | |||
397 | { | 397 | { |
398 | return (idx == ZONE_NORMAL); | 398 | return (idx == ZONE_NORMAL); |
399 | } | 399 | } |
400 | |||
400 | /** | 401 | /** |
401 | * is_highmem - helper function to quickly check if a struct zone is a | 402 | * is_highmem - helper function to quickly check if a struct zone is a |
402 | * highmem zone or not. This is an attempt to keep references | 403 | * highmem zone or not. This is an attempt to keep references |
@@ -413,6 +414,16 @@ static inline int is_normal(struct zone *zone) | |||
413 | return zone == zone->zone_pgdat->node_zones + ZONE_NORMAL; | 414 | return zone == zone->zone_pgdat->node_zones + ZONE_NORMAL; |
414 | } | 415 | } |
415 | 416 | ||
417 | static inline int is_dma32(struct zone *zone) | ||
418 | { | ||
419 | return zone == zone->zone_pgdat->node_zones + ZONE_DMA32; | ||
420 | } | ||
421 | |||
422 | static inline int is_dma(struct zone *zone) | ||
423 | { | ||
424 | return zone == zone->zone_pgdat->node_zones + ZONE_DMA; | ||
425 | } | ||
426 | |||
416 | /* These two functions are used to setup the per zone pages min values */ | 427 | /* These two functions are used to setup the per zone pages min values */ |
417 | struct ctl_table; | 428 | struct ctl_table; |
418 | struct file; | 429 | struct file; |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 343083fec258..32d09c8d952b 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -97,32 +97,40 @@ struct page_state { | |||
97 | unsigned long pgpgout; /* Disk writes */ | 97 | unsigned long pgpgout; /* Disk writes */ |
98 | unsigned long pswpin; /* swap reads */ | 98 | unsigned long pswpin; /* swap reads */ |
99 | unsigned long pswpout; /* swap writes */ | 99 | unsigned long pswpout; /* swap writes */ |
100 | unsigned long pgalloc_high; /* page allocations */ | ||
101 | 100 | ||
101 | unsigned long pgalloc_high; /* page allocations */ | ||
102 | unsigned long pgalloc_normal; | 102 | unsigned long pgalloc_normal; |
103 | unsigned long pgalloc_dma32; | ||
103 | unsigned long pgalloc_dma; | 104 | unsigned long pgalloc_dma; |
105 | |||
104 | unsigned long pgfree; /* page freeings */ | 106 | unsigned long pgfree; /* page freeings */ |
105 | unsigned long pgactivate; /* pages moved inactive->active */ | 107 | unsigned long pgactivate; /* pages moved inactive->active */ |
106 | unsigned long pgdeactivate; /* pages moved active->inactive */ | 108 | unsigned long pgdeactivate; /* pages moved active->inactive */ |
107 | 109 | ||
108 | unsigned long pgfault; /* faults (major+minor) */ | 110 | unsigned long pgfault; /* faults (major+minor) */ |
109 | unsigned long pgmajfault; /* faults (major only) */ | 111 | unsigned long pgmajfault; /* faults (major only) */ |
112 | |||
110 | unsigned long pgrefill_high; /* inspected in refill_inactive_zone */ | 113 | unsigned long pgrefill_high; /* inspected in refill_inactive_zone */ |
111 | unsigned long pgrefill_normal; | 114 | unsigned long pgrefill_normal; |
115 | unsigned long pgrefill_dma32; | ||
112 | unsigned long pgrefill_dma; | 116 | unsigned long pgrefill_dma; |
113 | 117 | ||
114 | unsigned long pgsteal_high; /* total highmem pages reclaimed */ | 118 | unsigned long pgsteal_high; /* total highmem pages reclaimed */ |
115 | unsigned long pgsteal_normal; | 119 | unsigned long pgsteal_normal; |
120 | unsigned long pgsteal_dma32; | ||
116 | unsigned long pgsteal_dma; | 121 | unsigned long pgsteal_dma; |
122 | |||
117 | unsigned long pgscan_kswapd_high;/* total highmem pages scanned */ | 123 | unsigned long pgscan_kswapd_high;/* total highmem pages scanned */ |
118 | unsigned long pgscan_kswapd_normal; | 124 | unsigned long pgscan_kswapd_normal; |
119 | 125 | unsigned long pgscan_kswapd_dma32; | |
120 | unsigned long pgscan_kswapd_dma; | 126 | unsigned long pgscan_kswapd_dma; |
127 | |||
121 | unsigned long pgscan_direct_high;/* total highmem pages scanned */ | 128 | unsigned long pgscan_direct_high;/* total highmem pages scanned */ |
122 | unsigned long pgscan_direct_normal; | 129 | unsigned long pgscan_direct_normal; |
130 | unsigned long pgscan_direct_dma32; | ||
123 | unsigned long pgscan_direct_dma; | 131 | unsigned long pgscan_direct_dma; |
124 | unsigned long pginodesteal; /* pages reclaimed via inode freeing */ | ||
125 | 132 | ||
133 | unsigned long pginodesteal; /* pages reclaimed via inode freeing */ | ||
126 | unsigned long slabs_scanned; /* slab objects scanned */ | 134 | unsigned long slabs_scanned; /* slab objects scanned */ |
127 | unsigned long kswapd_steal; /* pages reclaimed by kswapd */ | 135 | unsigned long kswapd_steal; /* pages reclaimed by kswapd */ |
128 | unsigned long kswapd_inodesteal;/* reclaimed via kswapd inode freeing */ | 136 | unsigned long kswapd_inodesteal;/* reclaimed via kswapd inode freeing */ |
@@ -150,17 +158,19 @@ extern void __mod_page_state(unsigned long offset, unsigned long delta); | |||
150 | #define add_page_state(member,delta) mod_page_state(member, (delta)) | 158 | #define add_page_state(member,delta) mod_page_state(member, (delta)) |
151 | #define sub_page_state(member,delta) mod_page_state(member, 0UL - (delta)) | 159 | #define sub_page_state(member,delta) mod_page_state(member, 0UL - (delta)) |
152 | 160 | ||
153 | #define mod_page_state_zone(zone, member, delta) \ | 161 | #define mod_page_state_zone(zone, member, delta) \ |
154 | do { \ | 162 | do { \ |
155 | unsigned offset; \ | 163 | unsigned offset; \ |
156 | if (is_highmem(zone)) \ | 164 | if (is_highmem(zone)) \ |
157 | offset = offsetof(struct page_state, member##_high); \ | 165 | offset = offsetof(struct page_state, member##_high); \ |
158 | else if (is_normal(zone)) \ | 166 | else if (is_normal(zone)) \ |
159 | offset = offsetof(struct page_state, member##_normal); \ | 167 | offset = offsetof(struct page_state, member##_normal); \ |
160 | else \ | 168 | else if (is_dma32(zone)) \ |
161 | offset = offsetof(struct page_state, member##_dma); \ | 169 | offset = offsetof(struct page_state, member##_dma32); \ |
162 | __mod_page_state(offset, (delta)); \ | 170 | else \ |
163 | } while (0) | 171 | offset = offsetof(struct page_state, member##_dma); \ |
172 | __mod_page_state(offset, (delta)); \ | ||
173 | } while (0) | ||
164 | 174 | ||
165 | /* | 175 | /* |
166 | * Manipulation of page state flags | 176 | * Manipulation of page state flags |