linux, large page initialization code question
Thomas Stüfe
thomas.stuefe at gmail.com
Fri Dec 4 07:31:44 UTC 2020
Hi,
looking a the large-page initialization code, in
os::Linux::find_default_large_page_size(). I see the following segment:
```
// If we can't determine the value (e.g. /proc is not mounted, or the text
// format has been changed), we'll use the largest page size supported by
// the processor.
#ifndef ZERO
large_page_size =
AARCH64_ONLY(2 * M)
AMD64_ONLY(2 * M)
ARM32_ONLY(2 * M)
IA32_ONLY(4 * M)
IA64_ONLY(256 * M)
PPC_ONLY(4 * M)
S390_ONLY(1 * M);
#endif // ZERO
```
This seems so strange:
- can we simply assume a huge page size if the proc file system gives no
indication for it?
- planning on the proc file system format changing is probably unnecessary;
it's well defined and will probably never change in an incompatible way.
- and if /proc is not mounted, a lot of other things would not work, no? Is
that even possible? I never saw a linux box without /proc
- and why disabled for ZERO?
What is the story behind this? The original change is lost to me (the
earliest I looked into was jdk8), and the #ifndef zero change came in with
"6890308: integrate zero assembler hotspot changes" without any explanation
I could find.
Bottom line, do we still need it? I think just assuming a large page size
if the system is not configured for it is wrong.
Thanks, Thomas
More information about the hotspot-gc-dev
mailing list