Skip to content

Commit

Permalink
Revert "Gross hack to allow us to tweak qemu overhead"
Browse files Browse the repository at this point in the history
This reverts commit 4e2707b.
  • Loading branch information
rvs committed Apr 23, 2021
1 parent d099814 commit ac3865f
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions pkg/pillar/hypervisor/kvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

//TBD: Have a better way to calculate this number.
//For now it is based on some trial-and-error experiments
const qemuOverHead = int64(2048 * 1024 * 1024)
const qemuOverHead = int64(600 * 1024 * 1024)

const minUringKernelTag = uint64((5 << 16) | (4 << 8) | (72 << 0))

Expand Down Expand Up @@ -424,13 +424,7 @@ func (ctx kvmContext) Setup(status types.DomainStatus, config types.DomainConfig
return logError("failed to add kvm hypervisor loader to domain %s: %v", status.DomainName, err)
}

effectiveQemuOverHead := qemuOverHead
if s, err := ioutil.ReadFile("/config/qemu_overhead.cfg"); err == nil {
if i, err := strconv.Atoi(string(s)); err == nil && i > 0 {
effectiveQemuOverHead = int64(i)
}
}
spec.AdjustMemLimit(config, effectiveQemuOverHead)
spec.AdjustMemLimit(config, qemuOverHead)
spec.Get().Process.Args = args
if err := spec.CreateContainer(true); err != nil {
return logError("Failed to create container for task %s from %v: %v", status.DomainName, config, err)
Expand Down

0 comments on commit ac3865f

Please sign in to comment.