diff options
author | Jerome Marchand <jmarchan@redhat.com> | 2014-01-21 18:49:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-21 19:19:44 -0500 |
commit | 49f0ce5f92321cdcf741e35f385669a421013cb7 (patch) | |
tree | d41c5a2283b32be69840cb8722ffd8cd8c38a1b0 /include/linux/mm.h | |
parent | aec6a8889a98a0cd58357cd0937a25189908f191 (diff) |
mm: add overcommit_kbytes sysctl variable
Some applications that run on HPC clusters are designed around the
availability of RAM and the overcommit ratio is fine tuned to get the
maximum usage of memory without swapping. With growing memory, the
1%-of-all-RAM grain provided by overcommit_ratio has become too coarse
for these workload (on a 2TB machine it represents no less than 20GB).
This patch adds the new overcommit_kbytes sysctl variable that allow a
much finer grain.
[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: fix nommu build]
Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 4c0c01afc19b..a512dd836931 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -57,6 +57,15 @@ extern int sysctl_legacy_va_layout; | |||
57 | extern unsigned long sysctl_user_reserve_kbytes; | 57 | extern unsigned long sysctl_user_reserve_kbytes; |
58 | extern unsigned long sysctl_admin_reserve_kbytes; | 58 | extern unsigned long sysctl_admin_reserve_kbytes; |
59 | 59 | ||
60 | extern int sysctl_overcommit_memory; | ||
61 | extern int sysctl_overcommit_ratio; | ||
62 | extern unsigned long sysctl_overcommit_kbytes; | ||
63 | |||
64 | extern int overcommit_ratio_handler(struct ctl_table *, int, void __user *, | ||
65 | size_t *, loff_t *); | ||
66 | extern int overcommit_kbytes_handler(struct ctl_table *, int, void __user *, | ||
67 | size_t *, loff_t *); | ||
68 | |||
60 | #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n)) | 69 | #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n)) |
61 | 70 | ||
62 | /* to align the pointer to the (next) page boundary */ | 71 | /* to align the pointer to the (next) page boundary */ |