[RISC-V][GC] Use 128gb for regions_range on RISCV64#84797
[RISC-V][GC] Use 128gb for regions_range on RISCV64#84797janvorli merged 2 commits intodotnet:mainfrom
Conversation
|
Tagging subscribers to this area: @dotnet/gc Issue DetailsUse 128gb for regions_range cause RISCV64 SV39 memory layout allows to use only 256gb of virtual memory: https://docs.kernel.org/riscv/vm-layout.html#risc-v-linux-kernel-sv39.
|
6e48f01 to
4001812
Compare
4001812 to
dbb0aaa
Compare
mangod9
left a comment
There was a problem hiding this comment.
Nit: might even be easier to make it REGIONS_RESERVATION_SIZE_GB to reduce the 1024 * duplication.
|
@janvorli, is that 256GB limit something we can deduce from the operating system so that we don't need to hardcode it? |
|
@cshung unfortunately there is no API to get virtual memory size limit on Linux. However, it seems it would be better to use the value returned by the runtime/src/coreclr/gc/unix/gcenv.unix.cpp Lines 1080 to 1092 in e121d77 @t-mustafin we should also modify the GlobalMemoryStatusEx implementation in PAL here: runtime/src/coreclr/pal/src/misc/sysinfo.cpp Lines 473 to 478 in e121d77 |
|
@janvorli And I also added RISCV ifdef for |
Use 128gb for regions_range cause RISCV64 SV39 memory layout allows to use only 256gb of virtual memory: https://docs.kernel.org/riscv/vm-layout.html#risc-v-linux-kernel-sv39.
Use 128gb for regions_range cause RISCV64 SV39 memory layout allows to use only 256gb of virtual memory: https://docs.kernel.org/riscv/vm-layout.html#risc-v-linux-kernel-sv39.