New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(qrm): implement a native policy for cpu qrm plugin #144
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #144 +/- ##
==========================================
- Coverage 51.21% 50.95% -0.26%
==========================================
Files 412 418 +6
Lines 39094 40409 +1315
==========================================
+ Hits 20023 20592 +569
- Misses 16834 17562 +728
- Partials 2237 2255 +18
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
38e98ba
to
6aad57f
Compare
fcdbe8f
to
f90628a
Compare
Signed-off-by: caohe <caohe9603@gmail.com>
Signed-off-by: caohe <caohe9603@gmail.com>
Signed-off-by: caohe <caohe9603@gmail.com>
Signed-off-by: caohe <caohe9603@gmail.com>
Signed-off-by: caohe <caohe9603@gmail.com>
Signed-off-by: caohe <caohe9603@gmail.com>
Signed-off-by: caohe <caohe9603@gmail.com>
a2de941
to
269b5be
Compare
Signed-off-by: caohe <caohe9603@gmail.com>
@@ -402,6 +407,7 @@ func (ns *NUMANodeState) SetAllocationInfo(podUID string, containerName string, | |||
} | |||
|
|||
// GetDefaultCPUSet returns default cpuset in this node | |||
// TODO: add lock to NUMANodeMap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since stateCheckpoint functions are all under locks, it seems that we don't need to add lock in the operations in
specifc state struct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed.
pkg/consts/qrm.go
Outdated
@@ -19,4 +19,16 @@ package consts | |||
const ( | |||
// KubeletQoSResourceManagerCheckpoint is the name of the checkpoint file for kubelet QoS resource manager | |||
KubeletQoSResourceManagerCheckpoint = "kubelet_qrm_checkpoint" | |||
|
|||
// CPUResourcePluginPolicyNameDynamic is the name of the dynamic policy. | |||
CPUResourcePluginPolicyNameDynamic = "dynamic" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be better to put cpu related consts under cpu package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
SkipCPUStateCorruption: false, | ||
EnableCPUPressureEviction: false, | ||
EnableSyncingCPUIdle: false, | ||
EnableCPUIdle: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe it's better to separate options/configs for different policies, ie.
- define general options/configs in
CPUOptions/CPUConfigurations
- define native-policy-specified options/configs in
CPUNativePolicyOptions/CPUNativePolicyConfigurations
- define dynamic-policy-specified options/configs in
CPUDynamicPolicyOptions/CPUDynamicPolicyConfiguration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Signed-off-by: caohe <caohe9603@gmail.com>
What type of PR is this?
Features
What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for your reviewer:
This PR needs #150 to be merged first.