[llvm] [Draft][BOLT] fix hugify for old kernels (#201813) (PR #201818)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 5 07:09:38 PDT 2026


DmitriiMartynov wrote:

> > whether we need to support old kernels or not?
> 
> My understanding is that BOLT have support for old kernels implemented, so we should preserve the correctness of that implementation
> 
> https://github.com/llvm/llvm-project/blob/4fdb108b8e203e7fc7ff3ea73b7fc5d009a36954/bolt/runtime/hugify.cpp#L160

Yes, agree, it is supposed to support old kernels too. I'll cleanup the commit.

JFYI, the mentioned function is about this kernel config READ_ONLY_THP_FOR_FS which was introduced in kernel 5.4 https://github.com/torvalds/linux/commit/99cb0dbd47a15d395bf3faa78dc122bc5efe3fc0 . It's still not clear to me why hasPagecacheTHPSupport function checks for kernel 5.10 version.

https://github.com/llvm/llvm-project/pull/201818


More information about the llvm-commits mailing list