summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorHiroshi Doyu <hdoyu@nvidia.com>2013-04-12 12:43:43 +0300
committerHiroshi Doyu <hdoyu@nvidia.com>2013-10-13 23:17:56 -0700
commit6a32c3e687f883f2c66e2365ae8287c076388153 (patch)
tree758c06f9ac68269e767513e62d2f518c84e51454 /mm
parentd6d56590c5c36d2f6e172e8e0e26d100be5125a3 (diff)
mm: Expose lazy vfree pages to control via sysctl
Create "/proc/sys/lazy_vfree_pages" file to control lazy vfree pages Bug 1238957 Change-Id: I75a296ae035d8cedb817319d8f4a5579ae6cf1ba Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com> Reviewed-on: http://git-master/r/289616 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Diffstat (limited to 'mm')
-rw-r--r--mm/vmalloc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index d365724feb05..396c71c396a0 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -552,13 +552,16 @@ static void vmap_debug_free_range(unsigned long start, unsigned long end)
* code, and it will be simple to change the scale factor if we find that it
* becomes a problem on bigger systems.
*/
+
+int sysctl_lazy_vfree_pages = 32UL * 1024 * 1024 / PAGE_SIZE;
+
static unsigned long lazy_max_pages(void)
{
unsigned int log;
log = fls(num_online_cpus());
- return log * (32UL * 1024 * 1024 / PAGE_SIZE);
+ return log * sysctl_lazy_vfree_pages;
}
static atomic_t vmap_lazy_nr = ATOMIC_INIT(0);