Skip to content

Commit

Permalink
fix(qrm): fix native policy not enable core binding
Browse files Browse the repository at this point in the history
Signed-off-by: caohe <[email protected]>
  • Loading branch information
caohe committed Nov 22, 2024
1 parent a622a03 commit 6ccba16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/agent/qrm-plugins/cpu/nativepolicy/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ func (p *NativePolicy) Allocate(ctx context.Context,
}, nil
}

if isDebugPod {
if !p.enableCoreBinding || isDebugPod {
return &pluginapi.ResourceAllocationResponse{
PodUid: req.PodUid,
PodNamespace: req.PodNamespace,
Expand Down Expand Up @@ -436,7 +436,7 @@ func (p *NativePolicy) Allocate(ctx context.Context,
}, nil
}

if !p.enableCoreBinding || req.NativeQosClass != string(v1.PodQOSGuaranteed) || !isInteger {
if req.NativeQosClass != string(v1.PodQOSGuaranteed) || !isInteger {
return p.sharedPoolAllocationHandler(ctx, req)
}
return p.dedicatedCoresAllocationHandler(ctx, req)
Expand Down

0 comments on commit 6ccba16

Please sign in to comment.