riscv: Adjust mmap base address at a third of task size
authorAlexandre Ghiti <[email protected]>
Mon, 10 Dec 2018 06:21:46 +0000 (06:21 +0000)
committerPalmer Dabbelt <[email protected]>
Fri, 25 Jan 2019 18:50:53 +0000 (10:50 -0800)
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 <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Palmer Dabbelt <[email protected]>
arch/riscv/include/asm/processor.h

index 0531f49af5c30e7f5c825c84e3057f160b3a87dd..ce70bceb8872e76e5cfd6c553c28ed1799b2563f 100644 (file)
@@ -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