Skip to content

Commit ae662ee

Browse files
aghitipalmer-dabbelt
authored andcommitted
riscv: Adjust mmap base address at a third of task size
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@upmem.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
1 parent 28198c4 commit ae662ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/riscv/include/asm/processor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* This decides where the kernel will search for a free chunk of vm
2323
* space during mmap's.
2424
*/
25-
#define TASK_UNMAPPED_BASE PAGE_ALIGN(TASK_SIZE >> 1)
25+
#define TASK_UNMAPPED_BASE PAGE_ALIGN(TASK_SIZE / 3)
2626

2727
#define STACK_TOP TASK_SIZE
2828
#define STACK_TOP_MAX STACK_TOP

0 commit comments

Comments
 (0)