aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/vmstat.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/vmstat.h')
-rw-r--r--include/linux/vmstat.h11
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
58static inline void count_vm_events(enum vm_event_item item, long delta) 58static 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
189static 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
189static inline void __inc_zone_page_state(struct page *page, 195static 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
196static inline void __dec_zone_page_state(struct page *page, 201static inline void __dec_zone_page_state(struct page *page,