summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-09-07 10:15:43 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-09-07 10:15:43 -0700
commitedec328dda977bb47faee67703a489b5704da8e6 (patch)
tree529a0e0ff3dc22428a929a5170c93d1fb7fc6907
parentab3dba93ceea12d3498d522a5459631f518894ae (diff)
parentfdaab1ed013f10da49f358768460d8db56d7ee12 (diff)
Merge "mm: Kconfig: Add support for config size of purging vmap_area"
-rw-r--r--mm/Kconfig10
-rw-r--r--mm/vmalloc.c3
2 files changed, 12 insertions, 1 deletions
diff --git a/mm/Kconfig b/mm/Kconfig
index dcca76e498df..1105a5b79b1e 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -601,6 +601,16 @@ config ZSMALLOC_STAT
information to userspace via debugfs.
If unsure, say N.
+config VMAP_LAZY_PURGING_FACTOR
+ int "multiplier to the size of purged vmap areas"
+ default "8" if ARM
+ default "32"
+ help
+ It is used as a multiplier to the max VA pages purged in a
+ single attempt. For 32-bit in order to reduce fragmentation
+ of vmalloc space, we decrease the default value to "8".
+
+
config GENERIC_EARLY_IOREMAP
bool
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index c3c28beaae11..ceb7d0d6db35 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -624,7 +624,8 @@ static unsigned long lazy_max_pages(void)
log = fls(num_online_cpus());
- return log * (32UL * 1024 * 1024 / PAGE_SIZE);
+ return log * (1UL * CONFIG_VMAP_LAZY_PURGING_FACTOR *
+ 1024 * 1024 / PAGE_SIZE);
}
static atomic_t vmap_lazy_nr = ATOMIC_INIT(0);