[PATCH] D141659: [BOLT][HUGIFY] Adds fix for -hugify option

Maksim Panchenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 18 21:56:11 PST 2023


maksfb added a comment.

In D141659#4064335 <https://reviews.llvm.org/D141659#4064335>, @yavtuk wrote:

> In D141659#4063976 <https://reviews.llvm.org/D141659#4063976>, @maksfb wrote:
>
>> Could you clarify why this is a "temporary solution"? Are you working on a different patch? THP support might still be useful, but only under an option.
>
> @maksfb  I think the full solution is to check READ_ONLY_THP_FOR_FS option in /boot/config-xxx file.
> Depends on the option state and kernel version we can call munlock & madvise or hugifyForOldKernel function.
> I wouldn’t want to add extra options, if you agree with this implementation I can prepare the patch, what do you think?

Currently, I don’t see a guaranteed way to acquire THPs. As much as I hate adding a new option, I don’t see a way around it. I considered checking for envvar during runtime, but that solution has its own drawbacks. Although it’s a viable alternative.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141659/new/

https://reviews.llvm.org/D141659



More information about the llvm-commits mailing list