-
Notifications
You must be signed in to change notification settings - Fork 408
apis: update ResourceStatus to support NUMA-aware scheduling #1588
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,7 @@ package extension | |
| import ( | ||
| "encoding/json" | ||
|
|
||
| corev1 "k8s.io/api/core/v1" | ||
| metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
| "k8s.io/apimachinery/pkg/types" | ||
| ) | ||
|
|
@@ -65,8 +66,13 @@ type ResourceStatus struct { | |
| // CPUSet represents the allocated CPUs. It is Linux CPU list formatted string. | ||
| // When LSE/LSR Pod requested, koord-scheduler will update the field. | ||
| CPUSet string `json:"cpuset,omitempty"` | ||
| // CPUSharedPools represents the desired CPU Shared Pools used by LS Pods. | ||
| CPUSharedPools []CPUSharedPool `json:"cpuSharedPools,omitempty"` | ||
| // NUMANodeResources indicates that the Pod is constrained to run on the specified NUMA Node. | ||
| NUMANodeResources []NUMANodeResource `json:"numaNodeResources,omitempty"` | ||
| } | ||
|
|
||
| type NUMANodeResource struct { | ||
| Node int32 `json:"node"` | ||
| Resources corev1.ResourceList `json:"resources,omitempty"` | ||
| } | ||
|
|
||
| // CPUBindPolicy defines the CPU binding policy | ||
|
|
@@ -94,14 +100,6 @@ const ( | |
| CPUExclusivePolicyNUMANodeLevel CPUExclusivePolicy = "NUMANodeLevel" | ||
| ) | ||
|
|
||
| type NUMACPUSharedPools []CPUSharedPool | ||
|
|
||
| type CPUSharedPool struct { | ||
| Socket int32 `json:"socket"` | ||
| Node int32 `json:"node"` | ||
| CPUSet string `json:"cpuset,omitempty"` | ||
| } | ||
|
|
||
| type NodeCPUBindPolicy string | ||
|
|
||
| const ( | ||
|
|
@@ -171,6 +169,12 @@ type PodCPUAlloc struct { | |
|
|
||
| type PodCPUAllocs []PodCPUAlloc | ||
|
|
||
| type CPUSharedPool struct { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This share pool is not referenced?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. koordlet only needs to report pools to help diagnose, and koordlet will bind cpus per NUMANode of NUMANodeResources. This is also the current koordlet implementation. |
||
| Socket int32 `json:"socket"` | ||
| Node int32 `json:"node"` | ||
| CPUSet string `json:"cpuset,omitempty"` | ||
| } | ||
|
|
||
| type KubeletCPUManagerPolicy struct { | ||
| Policy string `json:"policy,omitempty"` | ||
| Options map[string]string `json:"options,omitempty"` | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.