Skip to content

Commit

Permalink
Add support for windows CPU affinity
Browse files Browse the repository at this point in the history
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
  • Loading branch information
kiashok committed Jun 20, 2024
1 parent 2d3f72e commit e9d4443
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions specs-go/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,19 @@ type WindowsCPUResources struct {
// cycles per 10,000 cycles. Set processor `maximum` to a percentage times
// 100.
Maximum *uint16 `json:"maximum,omitempty"`
// Set of CPUs to affinitize for this container.
AffinityCPUs []WindowsCPUGroupAffinity `json:"affinityCPUs,omitempty"`
// Specifies preferred set of numa node numbers to affinitize for this container.
AffinityPreferredNumaNodes []int64 `json:"affinityPreferredNumaNodes,omitempty"`
}

// Similar to _GROUP_AFFINITY struct defined in
// https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/miniport/ns-miniport-_group_affinity
type WindowsCPUGroupAffinity struct {
// CPU mask relative to this CPU group.
CPUMask uint64 `json:"cpuMask,omitempty"`
// CPU group that this CPU belongs to.
CPUGroup uint32 `json:"cpuGroup,omitempty"`
}

// WindowsStorageResources contains storage resource management settings.
Expand Down

0 comments on commit e9d4443

Please sign in to comment.