mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
[1.4] Update runtime-spec
Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
(cherry picked from commit 74c5436b7d)
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
This commit is contained in:
committed by
Aleksa Sarai
parent
82561ccdfc
commit
a0858eaf3b
+46
-6
@@ -251,6 +251,8 @@ type Linux struct {
|
||||
// IntelRdt contains Intel Resource Director Technology (RDT) information for
|
||||
// handling resource constraints and monitoring metrics (e.g., L3 cache, memory bandwidth) for the container
|
||||
IntelRdt *LinuxIntelRdt `json:"intelRdt,omitempty"`
|
||||
// MemoryPolicy contains NUMA memory policy for the container.
|
||||
MemoryPolicy *LinuxMemoryPolicy `json:"memoryPolicy,omitempty"`
|
||||
// Personality contains configuration for the Linux personality syscall
|
||||
Personality *LinuxPersonality `json:"personality,omitempty"`
|
||||
// TimeOffsets specifies the offset for supporting time namespaces.
|
||||
@@ -836,23 +838,41 @@ type LinuxSyscall struct {
|
||||
type LinuxIntelRdt struct {
|
||||
// The identity for RDT Class of Service
|
||||
ClosID string `json:"closID,omitempty"`
|
||||
|
||||
// Schemata specifies the complete schemata to be written as is to the
|
||||
// schemata file in resctrl fs. Each element represents a single line in the schemata file.
|
||||
// NOTE: This will overwrite schemas specified in the L3CacheSchema and/or
|
||||
// MemBwSchema fields.
|
||||
Schemata []string `json:"schemata,omitempty"`
|
||||
|
||||
// The schema for L3 cache id and capacity bitmask (CBM)
|
||||
// Format: "L3:<cache_id0>=<cbm0>;<cache_id1>=<cbm1>;..."
|
||||
// NOTE: Should not be specified if Schemata is non-empty.
|
||||
L3CacheSchema string `json:"l3CacheSchema,omitempty"`
|
||||
|
||||
// The schema of memory bandwidth per L3 cache id
|
||||
// Format: "MB:<cache_id0>=bandwidth0;<cache_id1>=bandwidth1;..."
|
||||
// The unit of memory bandwidth is specified in "percentages" by
|
||||
// default, and in "MBps" if MBA Software Controller is enabled.
|
||||
// NOTE: Should not be specified if Schemata is non-empty.
|
||||
MemBwSchema string `json:"memBwSchema,omitempty"`
|
||||
|
||||
// EnableCMT is the flag to indicate if the Intel RDT CMT is enabled. CMT (Cache Monitoring Technology) supports monitoring of
|
||||
// the last-level cache (LLC) occupancy for the container.
|
||||
EnableCMT bool `json:"enableCMT,omitempty"`
|
||||
// EnableMonitoring enables resctrl monitoring for the container. This will
|
||||
// create a dedicated resctrl monitoring group for the container.
|
||||
EnableMonitoring bool `json:"enableMonitoring,omitempty"`
|
||||
}
|
||||
|
||||
// EnableMBM is the flag to indicate if the Intel RDT MBM is enabled. MBM (Memory Bandwidth Monitoring) supports monitoring of
|
||||
// total and local memory bandwidth for the container.
|
||||
EnableMBM bool `json:"enableMBM,omitempty"`
|
||||
// LinuxMemoryPolicy represents input for the set_mempolicy syscall.
|
||||
type LinuxMemoryPolicy struct {
|
||||
// Mode for the set_mempolicy syscall.
|
||||
Mode MemoryPolicyModeType `json:"mode"`
|
||||
|
||||
// Nodes representing the nodemask for the set_mempolicy syscall in comma separated ranges format.
|
||||
// Format: "<node0>-<node1>,<node2>,<node3>-<node4>,..."
|
||||
Nodes string `json:"nodes"`
|
||||
|
||||
// Flags for the set_mempolicy syscall.
|
||||
Flags []MemoryPolicyFlagType `json:"flags,omitempty"`
|
||||
}
|
||||
|
||||
// ZOS contains platform-specific configuration for z/OS based containers.
|
||||
@@ -884,6 +904,26 @@ const (
|
||||
ZOSUTSNamespace ZOSNamespaceType = "uts"
|
||||
)
|
||||
|
||||
type MemoryPolicyModeType string
|
||||
|
||||
const (
|
||||
MpolDefault MemoryPolicyModeType = "MPOL_DEFAULT"
|
||||
MpolBind MemoryPolicyModeType = "MPOL_BIND"
|
||||
MpolInterleave MemoryPolicyModeType = "MPOL_INTERLEAVE"
|
||||
MpolWeightedInterleave MemoryPolicyModeType = "MPOL_WEIGHTED_INTERLEAVE"
|
||||
MpolPreferred MemoryPolicyModeType = "MPOL_PREFERRED"
|
||||
MpolPreferredMany MemoryPolicyModeType = "MPOL_PREFERRED_MANY"
|
||||
MpolLocal MemoryPolicyModeType = "MPOL_LOCAL"
|
||||
)
|
||||
|
||||
type MemoryPolicyFlagType string
|
||||
|
||||
const (
|
||||
MpolFNumaBalancing MemoryPolicyFlagType = "MPOL_F_NUMA_BALANCING"
|
||||
MpolFRelativeNodes MemoryPolicyFlagType = "MPOL_F_RELATIVE_NODES"
|
||||
MpolFStaticNodes MemoryPolicyFlagType = "MPOL_F_STATIC_NODES"
|
||||
)
|
||||
|
||||
// LinuxSchedulerPolicy represents different scheduling policies used with the Linux Scheduler
|
||||
type LinuxSchedulerPolicy string
|
||||
|
||||
|
||||
+16
@@ -47,6 +47,7 @@ type Linux struct {
|
||||
Apparmor *Apparmor `json:"apparmor,omitempty"`
|
||||
Selinux *Selinux `json:"selinux,omitempty"`
|
||||
IntelRdt *IntelRdt `json:"intelRdt,omitempty"`
|
||||
MemoryPolicy *MemoryPolicy `json:"memoryPolicy,omitempty"`
|
||||
MountExtensions *MountExtensions `json:"mountExtensions,omitempty"`
|
||||
NetDevices *NetDevices `json:"netDevices,omitempty"`
|
||||
}
|
||||
@@ -130,6 +131,21 @@ type IntelRdt struct {
|
||||
// Unrelated to whether the host supports Intel RDT or not.
|
||||
// Nil value means "unknown", not "false".
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
// Schemata is true if the "linux.intelRdt.enableMonitoring" field of the
|
||||
// spec is implemented.
|
||||
Schemata *bool `json:"schemata,omitempty"`
|
||||
// Monitoring is true if the "linux.intelRdt.enableMonitoring" field of the
|
||||
// spec is implemented.
|
||||
// Nil value means "unknown", not "false".
|
||||
Monitoring *bool `json:"monitoring,omitempty"`
|
||||
}
|
||||
|
||||
// MemoryPolicy represents the "memoryPolicy" field.
|
||||
type MemoryPolicy struct {
|
||||
// modes is the list of known memory policy modes, e.g., "MPOL_INTERLEAVE".
|
||||
Modes []string `json:"modes,omitempty"`
|
||||
// flags is the list of known memory policy mode flags, e.g., "MPOL_F_STATIC_NODES".
|
||||
Flags []string `json:"flags,omitempty"`
|
||||
}
|
||||
|
||||
// MountExtensions represents the "mountExtensions" field.
|
||||
|
||||
Vendored
+1
-1
@@ -62,7 +62,7 @@ github.com/opencontainers/cgroups/fscommon
|
||||
github.com/opencontainers/cgroups/internal/path
|
||||
github.com/opencontainers/cgroups/manager
|
||||
github.com/opencontainers/cgroups/systemd
|
||||
# github.com/opencontainers/runtime-spec v1.2.2-0.20250401095657-e935f995dd67
|
||||
# github.com/opencontainers/runtime-spec v1.2.2-0.20250818071321-383cadbf08c0
|
||||
## explicit
|
||||
github.com/opencontainers/runtime-spec/specs-go
|
||||
github.com/opencontainers/runtime-spec/specs-go/features
|
||||
|
||||
Reference in New Issue
Block a user