Skip to content

Commit

Permalink
riscv: Adjust mmap base address at a third of task size
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexandre Ghiti authored and Palmer Dabbelt committed Jan 25, 2019
1 parent 28198c4 commit ae662ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/riscv/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ae662ee

Please sign in to comment.