mirror of
https://github.com/opencontainers/runc.git
synced 2025-09-26 19:41:35 +08:00
libcontainer/intelrdt: support explicit assignment to root CLOS
Makes it possible e.g. to enable monitoring (linux.intelRdt.enableMonitoring) without creating a CLOS (resctrl group) for the container. Implements https://github.com/opencontainers/runtime-spec/pull/1289. Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
This commit is contained in:
@@ -287,8 +287,9 @@ func intelrdtCheck(config *configs.Config) error {
|
||||
return fmt.Errorf("intelRdt is specified in config, but Intel RDT is not enabled")
|
||||
}
|
||||
|
||||
if config.IntelRdt.ClosID == "." || config.IntelRdt.ClosID == ".." || strings.Contains(config.IntelRdt.ClosID, "/") {
|
||||
return fmt.Errorf("invalid intelRdt.ClosID %q", config.IntelRdt.ClosID)
|
||||
switch clos := config.IntelRdt.ClosID; {
|
||||
case clos == ".", clos == "..", len(clos) > 1 && strings.Contains(clos, "/"):
|
||||
return fmt.Errorf("invalid intelRdt.ClosID %q", clos)
|
||||
}
|
||||
|
||||
if !intelrdt.IsCATEnabled() && config.IntelRdt.L3CacheSchema != "" {
|
||||
|
Reference in New Issue
Block a user