Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 46fa7281 authored by Zhenhua Huang's avatar Zhenhua Huang
Browse files

ARM: enable vmalloc saving



For some targets that have less vmalloc space this can be increased by
enabling config ENABLE_VMALLOC_SAVING. With this config we can reclaim
virtual mappings which remains unused because of non hlos carveout
reservations in lowmem.

Select the default method of reclaiming virtual memory as vmalloc saving.

Change-Id: I249992871babe8c64c34d52ef43bbc7c81636d47
Signed-off-by: default avatarZhenhua Huang <zhenhuah@codeaurora.org>
parent 7c355036
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1781,7 +1781,7 @@ source "mm/Kconfig"

choice
	prompt "Virtual Memory Reclaim"
	default NO_VM_RECLAIM
	default ENABLE_VMALLOC_SAVING
	help
	  Select the method of reclaiming virtual memory

+3 −2
Original line number Diff line number Diff line
@@ -1158,6 +1158,9 @@ void __init adjust_lowmem_bounds(void)
	u64 vmalloc_limit;
	struct memblock_region *reg;
	phys_addr_t lowmem_limit = 0;
#ifdef CONFIG_ENABLE_VMALLOC_SAVING
	struct memblock_region *prev_reg = NULL;
#endif

	/*
	 * Let's use our own (unoptimized) equivalent of __pa() that is
@@ -1169,8 +1172,6 @@ void __init adjust_lowmem_bounds(void)
	vmalloc_limit = (u64)(uintptr_t)vmalloc_min - PAGE_OFFSET + PHYS_OFFSET;

#ifdef CONFIG_ENABLE_VMALLOC_SAVING
	struct memblock_region *prev_reg = NULL;

	for_each_memblock(memory, reg) {
		if (prev_reg == NULL) {
			prev_reg = reg;