From 9f89ef604f4e57550a277a8c3073729081024db1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=81=A5=E4=BF=9E?= Date: Thu, 6 Jun 2024 14:47:35 +0800 Subject: [PATCH] chore(qrm): add shared NUMA pool infix --- .../cpu/dynamicpolicy/policy_allocation_handlers.go | 2 -- pkg/agent/qrm-plugins/cpu/dynamicpolicy/state/util.go | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/agent/qrm-plugins/cpu/dynamicpolicy/policy_allocation_handlers.go b/pkg/agent/qrm-plugins/cpu/dynamicpolicy/policy_allocation_handlers.go index 666211f82a..cb53701a3c 100644 --- a/pkg/agent/qrm-plugins/cpu/dynamicpolicy/policy_allocation_handlers.go +++ b/pkg/agent/qrm-plugins/cpu/dynamicpolicy/policy_allocation_handlers.go @@ -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", diff --git a/pkg/agent/qrm-plugins/cpu/dynamicpolicy/state/util.go b/pkg/agent/qrm-plugins/cpu/dynamicpolicy/state/util.go index 7828607e0b..348028d840 100644 --- a/pkg/agent/qrm-plugins/cpu/dynamicpolicy/state/util.go +++ b/pkg/agent/qrm-plugins/cpu/dynamicpolicy/state/util.go @@ -53,6 +53,7 @@ const ( FakedContainerName = "" FakedNUMAID = -1 NameSeparator = "#" + NUMAPoolInfix = "-NUMA" ) var ( @@ -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 {