File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,10 @@ other options are ignored.
112112 Name : "pids-limit" ,
113113 Usage : "Maximum number of pids allowed in the container" ,
114114 },
115+ cli.StringFlag {
116+ Name : "l3-cache-schema" ,
117+ Usage : "The string of Intel RDT/CAT L3 cache schema" ,
118+ },
115119 },
116120 Action : func (context * cli.Context ) error {
117121 if err := checkArgs (context , 1 , exactArgs ); err != nil {
@@ -254,6 +258,21 @@ other options are ignored.
254258 config .Cgroups .Resources .MemorySwap = * r .Memory .Swap
255259 config .Cgroups .Resources .PidsLimit = r .Pids .Limit
256260
261+ // If intelRdt is not specified in config
262+ if config .IntelRdt == nil {
263+ return fmt .Errorf ("failed to update l3-cache-schema: intelRdt.l3CacheSchema is not specified in config" )
264+ }
265+
266+ i := specs.LinuxIntelRdt {
267+ L3CacheSchema : "" ,
268+ }
269+
270+ if val := context .String ("l3-cache-schema" ); val != "" {
271+ i .L3CacheSchema = val
272+ }
273+
274+ config .IntelRdt .L3CacheSchema = i .L3CacheSchema
275+
257276 return container .Set (config )
258277 },
259278}
You can’t perform that action at this time.
0 commit comments