diff options
author | Christoph Lameter <clameter@sgi.com> | 2006-06-30 04:55:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-30 14:25:35 -0400 |
commit | ce866b34ae1b7f1ce60234cf65855886ac7e7d30 (patch) | |
tree | e9a2664f0abc5221b9a92e1417d8e02b94a634c4 /include | |
parent | b1e7a8fd854d2f895730e82137400012b509650e (diff) |
[PATCH] zoned vm counters: conversion of nr_writeback to per zone counter
Conversion of nr_writeback to per zone counter.
This removes the last page_state counter from arch/i386/mm/pgtable.c so we
drop the page_state from there.
[akpm@osdl.org: bugfix]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mmzone.h | 1 | ||||
-rw-r--r-- | include/linux/page-flags.h | 8 | ||||
-rw-r--r-- | include/linux/vmstat.h | 1 |
3 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 1cc8412ac264..885cc9727001 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -54,6 +54,7 @@ enum zone_stat_item { | |||
54 | NR_SLAB, /* Pages used by slab allocator */ | 54 | NR_SLAB, /* Pages used by slab allocator */ |
55 | NR_PAGETABLE, /* used for pagetables */ | 55 | NR_PAGETABLE, /* used for pagetables */ |
56 | NR_FILE_DIRTY, | 56 | NR_FILE_DIRTY, |
57 | NR_WRITEBACK, | ||
57 | NR_VM_ZONE_STAT_ITEMS }; | 58 | NR_VM_ZONE_STAT_ITEMS }; |
58 | 59 | ||
59 | struct per_cpu_pages { | 60 | struct per_cpu_pages { |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index ff235c4b79ea..5748642e9f36 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -181,7 +181,7 @@ | |||
181 | do { \ | 181 | do { \ |
182 | if (!test_and_set_bit(PG_writeback, \ | 182 | if (!test_and_set_bit(PG_writeback, \ |
183 | &(page)->flags)) \ | 183 | &(page)->flags)) \ |
184 | inc_page_state(nr_writeback); \ | 184 | inc_zone_page_state(page, NR_WRITEBACK); \ |
185 | } while (0) | 185 | } while (0) |
186 | #define TestSetPageWriteback(page) \ | 186 | #define TestSetPageWriteback(page) \ |
187 | ({ \ | 187 | ({ \ |
@@ -189,14 +189,14 @@ | |||
189 | ret = test_and_set_bit(PG_writeback, \ | 189 | ret = test_and_set_bit(PG_writeback, \ |
190 | &(page)->flags); \ | 190 | &(page)->flags); \ |
191 | if (!ret) \ | 191 | if (!ret) \ |
192 | inc_page_state(nr_writeback); \ | 192 | inc_zone_page_state(page, NR_WRITEBACK); \ |
193 | ret; \ | 193 | ret; \ |
194 | }) | 194 | }) |
195 | #define ClearPageWriteback(page) \ | 195 | #define ClearPageWriteback(page) \ |
196 | do { \ | 196 | do { \ |
197 | if (test_and_clear_bit(PG_writeback, \ | 197 | if (test_and_clear_bit(PG_writeback, \ |
198 | &(page)->flags)) \ | 198 | &(page)->flags)) \ |
199 | dec_page_state(nr_writeback); \ | 199 | dec_zone_page_state(page, NR_WRITEBACK); \ |
200 | } while (0) | 200 | } while (0) |
201 | #define TestClearPageWriteback(page) \ | 201 | #define TestClearPageWriteback(page) \ |
202 | ({ \ | 202 | ({ \ |
@@ -204,7 +204,7 @@ | |||
204 | ret = test_and_clear_bit(PG_writeback, \ | 204 | ret = test_and_clear_bit(PG_writeback, \ |
205 | &(page)->flags); \ | 205 | &(page)->flags); \ |
206 | if (ret) \ | 206 | if (ret) \ |
207 | dec_page_state(nr_writeback); \ | 207 | dec_zone_page_state(page, NR_WRITEBACK); \ |
208 | ret; \ | 208 | ret; \ |
209 | }) | 209 | }) |
210 | 210 | ||
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index b323ea2c6260..60c2e0382ceb 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -22,7 +22,6 @@ | |||
22 | * commented here. | 22 | * commented here. |
23 | */ | 23 | */ |
24 | struct page_state { | 24 | struct page_state { |
25 | unsigned long nr_writeback; /* Pages under writeback */ | ||
26 | unsigned long nr_unstable; /* NFS unstable pages */ | 25 | unsigned long nr_unstable; /* NFS unstable pages */ |
27 | #define GET_PAGE_STATE_LAST nr_unstable | 26 | #define GET_PAGE_STATE_LAST nr_unstable |
28 | 27 | ||