]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/vmstat.h
include/linux/syscalls.h: add sys_renameat2() prototype
[karo-tx-linux.git] / include / linux / vmstat.h
index ea4476157e00321a6888a3643789dbd7f0bc9634..45c9cd1daf7af5eb142e7d31ecc4389fdbd3daa6 100644 (file)
@@ -27,9 +27,13 @@ struct vm_event_state {
 
 DECLARE_PER_CPU(struct vm_event_state, vm_event_states);
 
+/*
+ * vm counters are allowed to be racy. Use raw_cpu_ops to avoid the
+ * local_irq_disable overhead.
+ */
 static inline void __count_vm_event(enum vm_event_item item)
 {
-       __this_cpu_inc(vm_event_states.event[item]);
+       raw_cpu_inc(vm_event_states.event[item]);
 }
 
 static inline void count_vm_event(enum vm_event_item item)
@@ -39,7 +43,7 @@ static inline void count_vm_event(enum vm_event_item item)
 
 static inline void __count_vm_events(enum vm_event_item item, long delta)
 {
-       __this_cpu_add(vm_event_states.event[item], delta);
+       raw_cpu_add(vm_event_states.event[item], delta);
 }
 
 static inline void count_vm_events(enum vm_event_item item, long delta)