Skip to content

Commit

Permalink
cluster: persistent disable THP
Browse files Browse the repository at this point in the history
  • Loading branch information
dveeden committed Jan 21, 2025
1 parent 0791a28 commit d774fd7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/cluster/manager/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,11 @@ func fixFailedChecks(host string, res *operator.CheckResult, t *task.Builder, sy
msg = fmt.Sprintf("will try to %s, reboot might be needed", color.HiBlueString("disable SELinux"))
case operator.CheckNameTHP:
t.Shell(host,
fmt.Sprintf(`if [ -d %[1]s ]; then echo never > %[1]s/enabled; fi`, "/sys/kernel/mm/transparent_hugepage"),
fmt.Sprintf(
`if [ -d %[1]s ]; then echo never > %[1]s/enabled; fi && %s`,
"/sys/kernel/mm/transparent_hugepage",
`grubby --update-kernel=ALL --args="transparent_hugepage=never"`,
),
"",
sudo)
msg = fmt.Sprintf("will try to %s, please check again after reboot", color.HiBlueString("disable THP"))
Expand Down

0 comments on commit d774fd7

Please sign in to comment.