diff options
Diffstat (limited to 'include/linux/mman.h')
| -rw-r--r-- | include/linux/mman.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/include/linux/mman.h b/include/linux/mman.h index 30d1073bac3b..9872d6ca58ae 100644 --- a/include/linux/mman.h +++ b/include/linux/mman.h | |||
| @@ -12,21 +12,18 @@ | |||
| 12 | 12 | ||
| 13 | #ifdef __KERNEL__ | 13 | #ifdef __KERNEL__ |
| 14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
| 15 | #include <linux/percpu_counter.h> | ||
| 15 | 16 | ||
| 16 | #include <asm/atomic.h> | 17 | #include <asm/atomic.h> |
| 17 | 18 | ||
| 18 | extern int sysctl_overcommit_memory; | 19 | extern int sysctl_overcommit_memory; |
| 19 | extern int sysctl_overcommit_ratio; | 20 | extern int sysctl_overcommit_ratio; |
| 20 | extern atomic_long_t vm_committed_space; | 21 | extern struct percpu_counter vm_committed_as; |
| 21 | 22 | ||
| 22 | #ifdef CONFIG_SMP | ||
| 23 | extern void vm_acct_memory(long pages); | ||
| 24 | #else | ||
| 25 | static inline void vm_acct_memory(long pages) | 23 | static inline void vm_acct_memory(long pages) |
| 26 | { | 24 | { |
| 27 | atomic_long_add(pages, &vm_committed_space); | 25 | percpu_counter_add(&vm_committed_as, pages); |
| 28 | } | 26 | } |
| 29 | #endif | ||
| 30 | 27 | ||
| 31 | static inline void vm_unacct_memory(long pages) | 28 | static inline void vm_unacct_memory(long pages) |
| 32 | { | 29 | { |
