diff --git a/bolt/runtime/hugify.cpp b/bolt/runtime/hugify.cpp --- a/bolt/runtime/hugify.cpp +++ b/bolt/runtime/hugify.cpp @@ -150,6 +150,16 @@ DEBUG(reportNumber("[hugify] aligned huge page from: ", (uint64_t)From, 16);) DEBUG(reportNumber("[hugify] aligned huge page to: ", (uint64_t)To, 16);) + // Using hugifyForOldKernel for all kernels is the temporary solution + // due to kernel configuration issue and the mandatory requirement to use + // anonymous pages + // + // https://github.com/facebookincubator/BOLT/issues/313 + // https://reviews.llvm.org/D140425 + // https://reviews.llvm.org/D137620 + hugifyForOldKernel(From, To); + +#if 0 if (!hasPagecacheTHPSupport()) { DEBUG(report( "[hugify] workaround with memory alignment for kernel < 5.10\n");) @@ -162,6 +172,7 @@ // TODO: allow user to control the failure behavior. reportError(Msg, sizeof(Msg)); } +#endif } /// This is hooking ELF's entry, it needs to save all machine state.