mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-19 17:16:12 +00:00
smtalign: add cpu-manager-policy-options flag in Kubelet
In this patch we enhance the kubelet configuration to support cpuManagerPolicyOptions. In order to introduce SMT-awareness in CPU Manager, we introduce a new flag in Kubelet to allow the user to specify an additional flag called `cpumanager-policy-options` to allow the user to modify the behaviour of static policy to strictly guarantee allocation of whole core. Co-authored-by: Francesco Romani <fromani@redhat.com> Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
This commit is contained in:
committed by
Francesco Romani
parent
4d78db54a5
commit
cc76a756e4
@@ -70,6 +70,7 @@ func Funcs(codecs runtimeserializer.CodecFactory) []interface{} {
|
||||
obj.NodeStatusReportFrequency = metav1.Duration{Duration: time.Minute}
|
||||
obj.NodeLeaseDurationSeconds = 40
|
||||
obj.CPUManagerPolicy = "none"
|
||||
obj.CPUManagerPolicyOptions = make(map[string]string)
|
||||
obj.CPUManagerReconcilePeriod = obj.NodeStatusUpdateFrequency
|
||||
obj.NodeStatusMaxImages = 50
|
||||
obj.TopologyManagerPolicy = kubeletconfig.NoneTopologyManagerPolicy
|
||||
|
@@ -150,6 +150,7 @@ var (
|
||||
"CPUCFSQuota",
|
||||
"CPUCFSQuotaPeriod.Duration",
|
||||
"CPUManagerPolicy",
|
||||
"CPUManagerPolicyOptions[*]",
|
||||
"CPUManagerReconcilePeriod.Duration",
|
||||
"TopologyManagerPolicy",
|
||||
"TopologyManagerScope",
|
||||
|
@@ -221,6 +221,10 @@ type KubeletConfiguration struct {
|
||||
// CPUManagerPolicy is the name of the policy to use.
|
||||
// Requires the CPUManager feature gate to be enabled.
|
||||
CPUManagerPolicy string
|
||||
// CPUManagerPolicyOptions is a set of key=value which allows to set extra options
|
||||
// to fine tune the behaviour of the cpu manager policies.
|
||||
// Requires both the "CPUManager" and "CPUManagerPolicyOptions" feature gates to be enabled.
|
||||
CPUManagerPolicyOptions map[string]string
|
||||
// CPU Manager reconciliation period.
|
||||
// Requires the CPUManager feature gate to be enabled.
|
||||
CPUManagerReconcilePeriod metav1.Duration
|
||||
|
Reference in New Issue
Block a user