-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create UVM honoring NUMA configuration parameters (#2198)
* Expose NUMA config to containers. Use HCS device affinity so that UVM is configured on same NUMA node as the device. Expose SLIT configuration to UVM to gather NUMA node distances. Signed-off-by: Apurv Barve <apurvbarve@microsoft.com> * Fixing lint errors Signed-off-by: Apurv Barve <apurvbarve@microsoft.com> * Fix linter errors Signed-off-by: Apurv Barve <apurvbarve@microsoft.com> * Addressing review comments Signed-off-by: Apurv Barve <apurvbarve@microsoft.com> * Addressing review comments Signed-off-by: Apurv Barve <apurvbarve@microsoft.com> * Schema changes Signed-off-by: Apurv Barve <apurvbarve@microsoft.com> * OS build version check Signed-off-by: Apurv Barve <apurvbarve@microsoft.com> * Removing some checks not required for container platform Signed-off-by: Apurv Barve <apurvbarve@microsoft.com> * Removing a TODO comment Signed-off-by: Apurv Barve <apurvbarve@microsoft.com> * Conditionalize setting PropagateNumaAffinity for newer OS build only Signed-off-by: Apurv Barve <apurvbarve@microsoft.com> * Changing variable name from propagationEnabled to propagateAffinity for better readability Signed-off-by: Apurv Barve <apurvbarve@microsoft.com> * Modifying comment and not initializing pointer as it happens implicitly. Signed-off-by: Apurv Barve <apurvbarve@microsoft.com> --------- Signed-off-by: Apurv Barve <apurvbarve@microsoft.com>
- Loading branch information
Showing
27 changed files
with
565 additions
and
118 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Autogenerated code; DO NOT EDIT. | ||
|
||
/* | ||
* Schema Open API | ||
* | ||
* No description provided (generated by Swagger Codegen https://github.com/swaggerapi/swaggercodegen) | ||
* | ||
* API version: 2.4 | ||
* Generated by: Swagger Codegen (https://github.com/swaggerapi/swaggercodegen.git) | ||
*/ | ||
|
||
package hcsschema | ||
|
||
type MemoryBackingType string | ||
|
||
// List of MemoryBackingType | ||
const ( | ||
MemoryBackingType_PHYSICAL MemoryBackingType = "Physical" | ||
MemoryBackingType_VIRTUAL MemoryBackingType = "Virtual" | ||
MemoryBackingType_HYBRID MemoryBackingType = "Hybrid" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Autogenerated code; DO NOT EDIT. | ||
|
||
/* | ||
* Schema Open API | ||
* | ||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) | ||
* | ||
* API version: 2.4 | ||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) | ||
*/ | ||
|
||
package hcsschema | ||
|
||
type Numa struct { | ||
VirtualNodeCount uint8 `json:"VirtualNodeCount,omitempty"` | ||
PreferredPhysicalNodes []int64 `json:"PreferredPhysicalNodes,omitempty"` | ||
Settings []NumaSetting `json:"Settings,omitempty"` | ||
MaxSizePerNode uint64 `json:"MaxSizePerNode,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Autogenerated code; DO NOT EDIT. | ||
|
||
/* | ||
* Schema Open API | ||
* | ||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) | ||
* | ||
* API version: 2.4 | ||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) | ||
*/ | ||
|
||
package hcsschema | ||
|
||
type NumaNode struct { | ||
VirtualNodeIndex uint32 `json:"VirtualNodeIndex,omitempty"` | ||
PhysicalNodeIndex uint32 `json:"PhysicalNodeIndex,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Autogenerated code; DO NOT EDIT. | ||
|
||
/* | ||
* Schema Open API | ||
* | ||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) | ||
* | ||
* API version: 2.4 | ||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) | ||
*/ | ||
|
||
package hcsschema | ||
|
||
type NumaNodeMemory struct { | ||
// Total physical memory on on this physical NUMA node that is consumable by the VMs. | ||
TotalConsumableMemoryInPages uint64 `json:"TotalConsumableMemoryInPages,omitempty"` | ||
// Currently available physical memory on this physical NUMA node for the VMs. | ||
AvailableMemoryInPages uint64 `json:"AvailableMemoryInPages,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Autogenerated code; DO NOT EDIT. | ||
|
||
/* | ||
* Schema Open API | ||
* | ||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) | ||
* | ||
* API version: 2.4 | ||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) | ||
*/ | ||
|
||
package hcsschema | ||
|
||
type NumaNodeProcessor struct { | ||
TotalAssignedProcessors uint32 `json:"TotalAssignedProcessors,omitempty"` | ||
TotalAvailableProcessors uint32 `json:"TotalAvailableProcessors,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Autogenerated code; DO NOT EDIT. | ||
|
||
/* | ||
* Schema Open API | ||
* | ||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) | ||
* | ||
* API version: 2.4 | ||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) | ||
*/ | ||
|
||
package hcsschema | ||
|
||
type NumaProcessors struct { | ||
CountPerNode Range `json:"count_per_node,omitempty"` | ||
NodePerSocket uint32 `json:"node_per_socket,omitempty"` | ||
} | ||
|
||
type Range struct { | ||
Max uint32 `json:"max,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Autogenerated code; DO NOT EDIT. | ||
|
||
/* | ||
* Schema Open API | ||
* | ||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) | ||
* | ||
* API version: 2.4 | ||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) | ||
*/ | ||
|
||
package hcsschema | ||
|
||
type NumaSetting struct { | ||
VirtualNodeNumber uint32 `json:"VirtualNodeNumber,omitempty"` | ||
PhysicalNodeNumber uint32 `json:"PhysicalNodeNumber,omitempty"` | ||
VirtualSocketNumber uint32 `json:"VirtualSocketNumber,omitempty"` | ||
CountOfProcessors uint32 `json:"CountOfProcessors,omitempty"` | ||
CountOfMemoryBlocks uint64 `json:"CountOfMemoryBlocks,omitempty"` | ||
MemoryBackingType MemoryBackingType `json:"MemoryBackingType,omitempty"` | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
// Autogenerated code; DO NOT EDIT. | ||
|
||
/* | ||
* HCS API | ||
* Schema Open API | ||
* | ||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) | ||
* | ||
* API version: 2.1 | ||
* API version: 2.4 | ||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) | ||
*/ | ||
|
||
package hcsschema | ||
|
||
type Topology struct { | ||
Memory *Memory2 `json:"Memory,omitempty"` | ||
|
||
Processor *Processor2 `json:"Processor,omitempty"` | ||
Memory *VirtualMachineMemory `json:"Memory,omitempty"` | ||
Processor *VirtualMachineProcessor `json:"Processor,omitempty"` | ||
Numa *Numa `json:"Numa,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,29 @@ | ||
// Autogenerated code; DO NOT EDIT. | ||
|
||
/* | ||
* HCS API | ||
* Schema Open API | ||
* | ||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) | ||
* | ||
* API version: 2.1 | ||
* API version: 2.4 | ||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) | ||
*/ | ||
|
||
package hcsschema | ||
|
||
// Configuration of a virtual machine, used during its creation to set up and/or use resources. | ||
type VirtualMachine struct { | ||
|
||
// StopOnReset is private in the schema. If regenerated need to put back. | ||
StopOnReset bool `json:"StopOnReset,omitempty"` | ||
|
||
Chipset *Chipset `json:"Chipset,omitempty"` | ||
|
||
ComputeTopology *Topology `json:"ComputeTopology,omitempty"` | ||
|
||
Devices *Devices `json:"Devices,omitempty"` | ||
|
||
GuestState *GuestState `json:"GuestState,omitempty"` | ||
|
||
RestoreState *RestoreState `json:"RestoreState,omitempty"` | ||
|
||
Version *Version `json:"Version,omitempty"` | ||
// When set to true, the virtual machine will treat a reset as a stop, releasing resources and cleaning up state. | ||
StopOnReset bool `json:"StopOnReset,omitempty"` | ||
Chipset *Chipset `json:"Chipset,omitempty"` | ||
ComputeTopology *Topology `json:"ComputeTopology,omitempty"` | ||
Devices *Devices `json:"Devices,omitempty"` | ||
GuestState *GuestState `json:"GuestState,omitempty"` | ||
RestoreState *RestoreState `json:"RestoreState,omitempty"` | ||
RegistryChanges *RegistryChanges `json:"RegistryChanges,omitempty"` | ||
|
||
StorageQoS *StorageQoS `json:"StorageQoS,omitempty"` | ||
|
||
StorageQoS *StorageQoS `json:"StorageQoS,omitempty"` | ||
DebugOptions *DebugOptions `json:"DebugOptions,omitempty"` | ||
GuestConnection *GuestConnection `json:"GuestConnection,omitempty"` | ||
|
||
SecuritySettings *SecuritySettings `json:"SecuritySettings,omitempty"` | ||
|
||
DebugOptions *DebugOptions `json:"DebugOptions,omitempty"` | ||
SecuritySettings *SecuritySettings `json:"SecuritySettings,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Autogenerated code; DO NOT EDIT. | ||
|
||
/* | ||
* Schema Open API | ||
* | ||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) | ||
* | ||
* API version: 2.4 | ||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) | ||
*/ | ||
|
||
package hcsschema | ||
|
||
type VirtualMachineMemory struct { | ||
SizeInMB uint64 `json:"SizeInMB,omitempty"` | ||
Backing *MemoryBackingType `json:"Backing,omitempty"` | ||
// If enabled, then the VM's memory is backed by the Windows pagefile rather than physically backed, statically allocated memory. | ||
AllowOvercommit bool `json:"AllowOvercommit,omitempty"` | ||
// If enabled, then the memory hot hint feature is exposed to the VM, allowing it to prefetch pages into its working set. (if supported by the guest operating system). | ||
EnableHotHint bool `json:"EnableHotHint,omitempty"` | ||
// If enabled, then the memory cold hint feature is exposed to the VM, allowing it to trim zeroed pages from its working set (if supported by the guest operating system). | ||
EnableColdHint bool `json:"EnableColdHint,omitempty"` | ||
// If enabled, then the memory cold discard hint feature is exposed to the VM, allowing it to trim non-zeroed pages from the working set (if supported by the guest operating system). | ||
EnableColdDiscardHint bool `json:"EnableColdDiscardHint,omitempty"` | ||
// If enabled, then commit is not charged for each backing page until first access. | ||
EnableDeferredCommit bool `json:"EnableDeferredCommit,omitempty"` | ||
// Low MMIO region allocated below 4GB | ||
LowMMIOGapInMB uint64 `json:"LowMmioGapInMB,omitempty"` | ||
// High MMIO region allocated above 4GB (base and size) | ||
HighMMIOBaseInMB uint64 `json:"HighMmioBaseInMB,omitempty"` | ||
HighMMIOGapInMB uint64 `json:"HighMmioGapInMB,omitempty"` | ||
SlitType *VirtualSlitType `json:"SlitType,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Autogenerated code; DO NOT EDIT. | ||
|
||
/* | ||
* Schema Open API | ||
* | ||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) | ||
* | ||
* API version: 2.4 | ||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) | ||
*/ | ||
|
||
package hcsschema | ||
|
||
type VirtualMachineProcessor struct { | ||
Count uint32 `json:"Count,omitempty"` | ||
Limit uint64 `json:"Limit,omitempty"` | ||
Weight uint64 `json:"Weight,omitempty"` | ||
Reservation uint64 `json:"Reservation,omitempty"` | ||
CpuGroup *CpuGroup `json:"CpuGroup,omitempty"` | ||
NumaProcessorsSettings *NumaProcessors `json:"NumaProcessorsSettings,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Autogenerated code; DO NOT EDIT. | ||
|
||
/* | ||
* Schema Open API | ||
* | ||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) | ||
* | ||
* API version: 2.4 | ||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) | ||
*/ | ||
|
||
package hcsschema | ||
|
||
// VirtualSlitType : Indicates if a virtual SLIT should ne enabled for a VM and the type of virtual SLIT to be enabled. | ||
type VirtualSlitType string | ||
|
||
// List of VirtualSlitType | ||
const ( | ||
VirtualSlitType_NONE VirtualSlitType = "None" | ||
VirtualSlitType_FIRMWARE VirtualSlitType = "Firmware" | ||
VirtualSlitType_MEASURED VirtualSlitType = "Measured" | ||
VirtualSlitType_FIRMWARE_FALLBACK_MEASURED VirtualSlitType = "FirmwareFallbackMeasured" | ||
) |
Oops, something went wrong.