Skip to content

Commit

Permalink
Checkup, vmi spec: Don't use host huge pages
Browse files Browse the repository at this point in the history
There is no need to use the host's huge pages as
the memory backend of the vm under test.

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

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

0 comments on commit a7303e0

Please sign in to comment.