Skip to content

Commit

Permalink
chore(qrm): add shared NUMA pool infix
Browse files Browse the repository at this point in the history
  • Loading branch information
csfldf committed Jun 6, 2024
1 parent ed23f14 commit 9f89ef6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,6 @@ func (p *DynamicPolicy) sharedCoresWithNUMABindingAllocationHandler(ctx context.

// there is no need to delete old allocationInfo for the container if it exists,
// allocateSharedNumaBindingCPUs will re-calculate pool size and avoid counting same entry twice

// [TODO]: pass pod entries
allocationInfo, err := p.allocateSharedNumaBindingCPUs(req, req.Hint)
if err != nil || allocationInfo == nil {
general.ErrorS(err, "unable to allocate CPUs",
Expand Down
3 changes: 2 additions & 1 deletion pkg/agent/qrm-plugins/cpu/dynamicpolicy/state/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const (
FakedContainerName = ""
FakedNUMAID = -1
NameSeparator = "#"
NUMAPoolInfix = "-NUMA"
)

var (
Expand Down Expand Up @@ -268,7 +269,7 @@ func GetSpecifiedPoolName(qosLevel, cpusetEnhancementValue string) string {
}

func GetNUMAPoolName(candidateSpecifiedPoolName string, targetNUMANode uint64) string {
return fmt.Sprintf("%s-NUMA%d", candidateSpecifiedPoolName, targetNUMANode)
return fmt.Sprintf("%s%s%d", candidateSpecifiedPoolName, NUMAPoolInfix, targetNUMANode)
}

func GetCPUIncrRatio(allocationInfo *AllocationInfo) float64 {
Expand Down

0 comments on commit 9f89ef6

Please sign in to comment.