File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-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,22 @@ other options are ignored.
254258 config .Cgroups .Resources .MemorySwap = * r .Memory .Swap
255259 config .Cgroups .Resources .PidsLimit = r .Pids .Limit
256260
261+ i := specs.LinuxIntelRdt {
262+ L3CacheSchema : "" ,
263+ }
264+
265+ if val := context .String ("l3-cache-schema" ); val != "" {
266+ i .L3CacheSchema = val
267+ }
268+
269+ if config .IntelRdt != nil {
270+ config .IntelRdt .L3CacheSchema = i .L3CacheSchema
271+ } else {
272+ if i .L3CacheSchema != "" {
273+ fmt .Printf ("failed to update l3-cache-schema: intelRdt.l3CacheSchema is not specified in config" )
274+ }
275+ }
276+
257277 return container .Set (config )
258278 },
259279}
You can’t perform that action at this time.
0 commit comments