Mercurial > hg > graal-jvmci-8
diff src/os/linux/vm/os_linux.cpp @ 12840:aa6f2ea19d8f
Merge
author | jcoomes |
---|---|
date | Fri, 11 Oct 2013 08:27:21 -0700 |
parents | 899ecf76b570 263f2c796d6c |
children | e4f478e7781b |
line wrap: on
line diff
--- a/src/os/linux/vm/os_linux.cpp Thu Oct 10 13:25:51 2013 -0700 +++ b/src/os/linux/vm/os_linux.cpp Fri Oct 11 08:27:21 2013 -0700 @@ -3361,13 +3361,15 @@ if (FLAG_IS_DEFAULT(UseHugeTLBFS) && FLAG_IS_DEFAULT(UseSHM) && FLAG_IS_DEFAULT(UseTransparentHugePages)) { - // If UseLargePages is specified on the command line try all methods, - // if it's default, then try only UseTransparentHugePages. - if (FLAG_IS_DEFAULT(UseLargePages)) { - UseTransparentHugePages = true; - } else { - UseHugeTLBFS = UseTransparentHugePages = UseSHM = true; - } + + // The type of large pages has not been specified by the user. + + // Try UseHugeTLBFS and then UseSHM. + UseHugeTLBFS = UseSHM = true; + + // Don't try UseTransparentHugePages since there are known + // performance issues with it turned on. This might change in the future. + UseTransparentHugePages = false; } if (UseTransparentHugePages) { @@ -3393,9 +3395,19 @@ } void os::large_page_init() { - if (!UseLargePages) { + if (!UseLargePages && + !UseTransparentHugePages && + !UseHugeTLBFS && + !UseSHM) { + // Not using large pages. + return; + } + + if (!FLAG_IS_DEFAULT(UseLargePages) && !UseLargePages) { + // The user explicitly turned off large pages. + // Ignore the rest of the large pages flags. + UseTransparentHugePages = false; UseHugeTLBFS = false; - UseTransparentHugePages = false; UseSHM = false; return; }