-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RISC-V][GC] Use 128gb for regions_range on RISCV64 #84797
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.