Skip to content

Commit

Permalink
Merge pull request #7665 from fengxue-IS/thp_linux
Browse files Browse the repository at this point in the history
Enable THP by default for all Linux
  • Loading branch information
DanHeidinga committed Nov 4, 2019
2 parents 208f6de + d29f8f3 commit 7f22610
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions runtime/vm/jvminit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1816,19 +1816,13 @@ IDATA VMInitStages(J9JavaVM *vm, IDATA stage, void* reserved) {
argIndex2 = FIND_ARG_IN_VMARGS(EXACT_MATCH, VMOPT_XXTRANSPARENT_HUGEPAGE, NULL);
{
/* Last instance of +/- TransparentHugepage found on the command line wins
* Default to -XX:-TransparentHugepage for performance reasons
*
* Default to use OMR setting (Enable for all Linux with THP set to madvise)
*/
if (argIndex2 > argIndex) {
j9port_control(J9PORT_CTLDATA_VMEM_ADVISE_HUGEPAGE, 1);
} else if (argIndex > argIndex2){
j9port_control(J9PORT_CTLDATA_VMEM_ADVISE_HUGEPAGE, 0);
} else {
#if defined(LINUX) && defined(J9VM_ARCH_X86)
/* Enable THP on xLinux by default */
j9port_control(J9PORT_CTLDATA_VMEM_ADVISE_HUGEPAGE, 1);
#else
} else if (argIndex > argIndex2) {
j9port_control(J9PORT_CTLDATA_VMEM_ADVISE_HUGEPAGE, 0);
#endif /* defined(LINUX) && defined(J9VM_ARCH_X86) */
}
}

Expand Down

0 comments on commit 7f22610

Please sign in to comment.