From fcb65ad2a2cb54990fb6171a5e357eb6a00b4705 Mon Sep 17 00:00:00 2001 From: Eric Wang Date: Wed, 5 Mar 2025 12:38:41 +0800 Subject: [PATCH] [BOLT] Fix kernel version check for THP in hugify (#129380) BOLT --hugify does not work in kernel 6.x. Co-authored-by: rfwang07 --- bolt/runtime/hugify.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bolt/runtime/hugify.cpp b/bolt/runtime/hugify.cpp index 05c1be4f2d70..a89cba2243c4 100644 --- a/bolt/runtime/hugify.cpp +++ b/bolt/runtime/hugify.cpp @@ -85,7 +85,8 @@ static bool hasPagecacheTHPSupport() { KernelVersionTy KernelVersion; getKernelVersion((uint32_t *)&KernelVersion); - if (KernelVersion.major >= 5 && KernelVersion.minor >= 10) + if (KernelVersion.major >= 6 || + (KernelVersion.major == 5 && KernelVersion.minor >= 10)) return true; return false;