[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190223210422.199966-23-sashal@kernel.org>
Date: Sat, 23 Feb 2019 16:03:33 -0500
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Alexandre Ghiti <aghiti@...em.com>,
Palmer Dabbelt <palmer@...ive.com>,
Sasha Levin <sashal@...nel.org>,
linux-riscv@...ts.infradead.org
Subject: [PATCH AUTOSEL 4.20 23/72] riscv: Adjust mmap base address at a third of task size
From: Alexandre Ghiti <aghiti@...em.com>
[ Upstream commit ae662eec8a515ab550524e04c793b5ddf1aae3a1 ]
This ratio is the most used among all other architectures and make
icache_hygiene libhugetlbfs test pass: this test mmap lots of
hugepages whose addresses, without this patch, reach the end of
the process user address space.
Signed-off-by: Alexandre Ghiti <aghiti@...em.com>
Reviewed-by: Christoph Hellwig <hch@....de>
Signed-off-by: Palmer Dabbelt <palmer@...ive.com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
arch/riscv/include/asm/processor.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/include/asm/processor.h b/arch/riscv/include/asm/processor.h
index 0531f49af5c30..ce70bceb8872e 100644
--- a/arch/riscv/include/asm/processor.h
+++ b/arch/riscv/include/asm/processor.h
@@ -22,7 +22,7 @@
* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
-#define TASK_UNMAPPED_BASE PAGE_ALIGN(TASK_SIZE >> 1)
+#define TASK_UNMAPPED_BASE PAGE_ALIGN(TASK_SIZE / 3)
#define STACK_TOP TASK_SIZE
#define STACK_TOP_MAX STACK_TOP
--
2.19.1
Powered by blists - more mailing lists