Skip to content

Commit 71a5e7c

Browse files
committed
generate: add --linux-intelRdt-closid option
Makes it possible to specify the closID parameter of intelRdt in linux runtime spec. Signed-off-by: Markus Lehtonen <[email protected]>
1 parent 59cdde0 commit 71a5e7c

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

cmd/oci-runtime-tool/generate.go

+5
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ var generateFlags = []cli.Flag{
5353
cli.StringSliceFlag{Name: "linux-gidmappings", Usage: "add GIDMappings e.g HostID:ContainerID:Size"},
5454
cli.StringSliceFlag{Name: "linux-hugepage-limits-add", Usage: "add hugepage resource limits"},
5555
cli.StringSliceFlag{Name: "linux-hugepage-limits-drop", Usage: "drop hugepage resource limits"},
56+
cli.StringFlag{Name: "linux-intelRdt-closid", Usage: "RDT Class of Service, i.e. group under the resctrl pseudo-filesystem which to associate the container with"},
5657
cli.StringFlag{Name: "linux-intelRdt-l3CacheSchema", Usage: "specifies the schema for L3 cache id and capacity bitmask"},
5758
cli.StringSliceFlag{Name: "linux-masked-paths", Usage: "specifies paths can not be read inside container"},
5859
cli.Uint64Flag{Name: "linux-mem-kernel-limit", Usage: "kernel memory limit (in bytes)"},
@@ -746,6 +747,10 @@ func setupSpec(g *generate.Generator, context *cli.Context) error {
746747
}
747748
}
748749

750+
if context.IsSet("linux-intelRdt-closid") {
751+
g.SetLinuxIntelRdtClosID(context.String("linux-intelRdt-closid"))
752+
}
753+
749754
if context.IsSet("linux-intelRdt-l3CacheSchema") {
750755
g.SetLinuxIntelRdtL3CacheSchema(context.String("linux-intelRdt-l3CacheSchema"))
751756
}

completions/bash/oci-runtime-tool

+1
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ _oci-runtime-tool_generate() {
335335
--linux-gidmappings
336336
--linux-hugepage-limits-add
337337
--linux-hugepage-limits-drop
338+
--linux-intelRdt-closid
338339
--linux-intelRdt-l3CacheSchema
339340
--linux-masked-paths
340341
--linux-mem-kernel-limit

generate/generate.go

+6
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,12 @@ func (g *Generator) SetLinuxCgroupsPath(path string) {
604604
g.Config.Linux.CgroupsPath = path
605605
}
606606

607+
// SetLinuxIntelRdtClosID sets g.Config.Linux.IntelRdt.ClosID
608+
func (g *Generator) SetLinuxIntelRdtClosID(clos string) {
609+
g.initConfigLinuxIntelRdt()
610+
g.Config.Linux.IntelRdt.ClosID = clos
611+
}
612+
607613
// SetLinuxIntelRdtL3CacheSchema sets g.Config.Linux.IntelRdt.L3CacheSchema
608614
func (g *Generator) SetLinuxIntelRdtL3CacheSchema(schema string) {
609615
g.initConfigLinuxIntelRdt()

man/oci-runtime-tool-generate.1.md

+4
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ read the configuration from `config.json`.
193193
Drop hugepage rsource limits. Just need to specify PAGESIZE. e.g. --linux-hugepage-limits-drop=4MB
194194
This option can be specified multiple times.
195195

196+
**--linux-intelRdt-closid**=""
197+
RDT Class of Service, i.e. group under the resctrl pseudo-filesystem, which
198+
to associate the container with.
199+
196200
**--linux-intelRdt-l3CacheSchema**=""
197201
Specifies the schema for L3 cache id and capacity bitmask.
198202

0 commit comments

Comments
 (0)