diff --git a/update.go b/update.go index 133be999685..43b0a43e0ec 100644 --- a/update.go +++ b/update.go @@ -112,6 +112,10 @@ other options are ignored. Name: "pids-limit", Usage: "Maximum number of pids allowed in the container", }, + cli.StringFlag{ + Name: "l3-cache-schema", + Usage: "The string of Intel RDT/CAT L3 cache schema", + }, }, Action: func(context *cli.Context) error { if err := checkArgs(context, 1, exactArgs); err != nil { @@ -254,6 +258,22 @@ other options are ignored. config.Cgroups.Resources.MemorySwap = *r.Memory.Swap config.Cgroups.Resources.PidsLimit = r.Pids.Limit + i := specs.LinuxIntelRdt{ + L3CacheSchema: "", + } + + if val := context.String("l3-cache-schema"); val != "" { + i.L3CacheSchema = val + } + + if config.IntelRdt != nil { + config.IntelRdt.L3CacheSchema = i.L3CacheSchema + } else { + if i.L3CacheSchema != "" { + fmt.Printf("failed to update l3-cache-schema: intelRdt.l3CacheSchema is not specified in config") + } + } + return container.Set(config) }, }