diff options
author | Paul Mackerras <paulus@samba.org> | 2006-07-31 20:37:25 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-07-31 20:37:25 -0400 |
commit | 57cad8084e0837e0f2c97da789ec9b3f36809be9 (patch) | |
tree | e9c790afb4286f78cb08d9664f58baa7e876fe55 /include/linux/vmstat.h | |
parent | cb18bd40030c879cd93fef02fd579f74dbab473d (diff) | |
parent | 49b1e3ea19b1c95c2f012b8331ffb3b169e4c042 (diff) |
Merge branch 'merge'
Diffstat (limited to 'include/linux/vmstat.h')
-rw-r--r-- | include/linux/vmstat.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 3e0daf54133e..1ab806c47514 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -57,7 +57,7 @@ static inline void __count_vm_events(enum vm_event_item item, long delta) | |||
57 | 57 | ||
58 | static inline void count_vm_events(enum vm_event_item item, long delta) | 58 | static inline void count_vm_events(enum vm_event_item item, long delta) |
59 | { | 59 | { |
60 | get_cpu_var(vm_event_states.event[item])++; | 60 | get_cpu_var(vm_event_states.event[item]) += delta; |
61 | put_cpu(); | 61 | put_cpu(); |
62 | } | 62 | } |
63 | 63 | ||
@@ -186,11 +186,16 @@ static inline void __mod_zone_page_state(struct zone *zone, | |||
186 | zone_page_state_add(delta, zone, item); | 186 | zone_page_state_add(delta, zone, item); |
187 | } | 187 | } |
188 | 188 | ||
189 | static inline void __inc_zone_state(struct zone *zone, enum zone_stat_item item) | ||
190 | { | ||
191 | atomic_long_inc(&zone->vm_stat[item]); | ||
192 | atomic_long_inc(&vm_stat[item]); | ||
193 | } | ||
194 | |||
189 | static inline void __inc_zone_page_state(struct page *page, | 195 | static inline void __inc_zone_page_state(struct page *page, |
190 | enum zone_stat_item item) | 196 | enum zone_stat_item item) |
191 | { | 197 | { |
192 | atomic_long_inc(&page_zone(page)->vm_stat[item]); | 198 | __inc_zone_state(page_zone(page), item); |
193 | atomic_long_inc(&vm_stat[item]); | ||
194 | } | 199 | } |
195 | 200 | ||
196 | static inline void __dec_zone_page_state(struct page *page, | 201 | static inline void __dec_zone_page_state(struct page *page, |