Skip to content

Commit

Permalink
Revert "Checkup, vmi spec: Don't use host huge pages"
Browse files Browse the repository at this point in the history
This reverts commit a7303e0.

Signed-off-by: Ram Lavi <ralavi@redhat.com>
  • Loading branch information
RamLavi committed Dec 3, 2023
1 parent ffb5a74 commit 68cc0e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pkg/internal/checkup/checkup.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ func newRealtimeVMI(checkupConfig config.Config) *kvcorev1.VirtualMachineInstanc
CPUSocketsCount = 1
CPUCoresCount = 3
CPUTreadsCount = 1
hugePageSize = "1Gi"
guestMemory = "4Gi"
rootDiskName = "rootdisk"
cloudInitDiskName = "cloudinitdisk"
Expand All @@ -186,7 +187,7 @@ user: user`
vmi.WithoutCRIOCPUQuota(),
vmi.WithoutCRIOIRQLoadBalancing(),
vmi.WithRealtimeCPU(CPUSocketsCount, CPUCoresCount, CPUTreadsCount),
vmi.WithMemory(guestMemory),
vmi.WithMemory(hugePageSize, guestMemory),
vmi.WithoutAutoAttachGraphicsDevice(),
vmi.WithoutAutoAttachMemBalloon(),
vmi.WithAutoAttachSerialConsole(),
Expand Down
5 changes: 3 additions & 2 deletions pkg/internal/checkup/vmi/vmi.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,12 @@ func WithVirtIODisk(name string) Option {
}
}

func WithMemory(guestMemory string) Option {
func WithMemory(hugePageSize, guestMemory string) Option {
return func(vmi *kvcorev1.VirtualMachineInstance) {
guestMemoryQuantity := resource.MustParse(guestMemory)
vmi.Spec.Domain.Memory = &kvcorev1.Memory{
Guest: &guestMemoryQuantity,
Hugepages: &kvcorev1.Hugepages{PageSize: hugePageSize},
Guest: &guestMemoryQuantity,
}
}
}
Expand Down

0 comments on commit 68cc0e3

Please sign in to comment.