diff options
Diffstat (limited to 'include/linux/mman.h')
-rw-r--r-- | include/linux/mman.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/mman.h b/include/linux/mman.h index 9aa863da287f..92dc257251e4 100644 --- a/include/linux/mman.h +++ b/include/linux/mman.h | |||
@@ -11,11 +11,17 @@ extern int sysctl_overcommit_memory; | |||
11 | extern int sysctl_overcommit_ratio; | 11 | extern int sysctl_overcommit_ratio; |
12 | extern struct percpu_counter vm_committed_as; | 12 | extern struct percpu_counter vm_committed_as; |
13 | 13 | ||
14 | #ifdef CONFIG_SMP | ||
15 | extern s32 vm_committed_as_batch; | ||
16 | #else | ||
17 | #define vm_committed_as_batch 0 | ||
18 | #endif | ||
19 | |||
14 | unsigned long vm_memory_committed(void); | 20 | unsigned long vm_memory_committed(void); |
15 | 21 | ||
16 | static inline void vm_acct_memory(long pages) | 22 | static inline void vm_acct_memory(long pages) |
17 | { | 23 | { |
18 | percpu_counter_add(&vm_committed_as, pages); | 24 | __percpu_counter_add(&vm_committed_as, pages, vm_committed_as_batch); |
19 | } | 25 | } |
20 | 26 | ||
21 | static inline void vm_unacct_memory(long pages) | 27 | static inline void vm_unacct_memory(long pages) |