Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cmd/oci-runtime-tool/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ var generateFlags = []cli.Flag{
cli.StringSliceFlag{Name: "linux-gidmappings", Usage: "add GIDMappings e.g HostID:ContainerID:Size"},
cli.StringSliceFlag{Name: "linux-hugepage-limits-add", Usage: "add hugepage resource limits"},
cli.StringSliceFlag{Name: "linux-hugepage-limits-drop", Usage: "drop hugepage resource limits"},
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"},
cli.StringFlag{Name: "linux-intelRdt-l3CacheSchema", Usage: "specifies the schema for L3 cache id and capacity bitmask"},
cli.StringSliceFlag{Name: "linux-masked-paths", Usage: "specifies paths can not be read inside container"},
cli.Uint64Flag{Name: "linux-mem-kernel-limit", Usage: "kernel memory limit (in bytes)"},
Expand Down Expand Up @@ -746,6 +747,10 @@ func setupSpec(g *generate.Generator, context *cli.Context) error {
}
}

if context.IsSet("linux-intelRdt-closid") {
g.SetLinuxIntelRdtClosID(context.String("linux-intelRdt-closid"))
}

if context.IsSet("linux-intelRdt-l3CacheSchema") {
g.SetLinuxIntelRdtL3CacheSchema(context.String("linux-intelRdt-l3CacheSchema"))
}
Expand Down
1 change: 1 addition & 0 deletions completions/bash/oci-runtime-tool
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ _oci-runtime-tool_generate() {
--linux-gidmappings
--linux-hugepage-limits-add
--linux-hugepage-limits-drop
--linux-intelRdt-closid
--linux-intelRdt-l3CacheSchema
--linux-masked-paths
--linux-mem-kernel-limit
Expand Down
6 changes: 6 additions & 0 deletions generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,12 @@ func (g *Generator) SetLinuxCgroupsPath(path string) {
g.Config.Linux.CgroupsPath = path
}

// SetLinuxIntelRdtClosID sets g.Config.Linux.IntelRdt.ClosID
func (g *Generator) SetLinuxIntelRdtClosID(clos string) {
g.initConfigLinuxIntelRdt()
g.Config.Linux.IntelRdt.ClosID = clos
}

// SetLinuxIntelRdtL3CacheSchema sets g.Config.Linux.IntelRdt.L3CacheSchema
func (g *Generator) SetLinuxIntelRdtL3CacheSchema(schema string) {
g.initConfigLinuxIntelRdt()
Expand Down
4 changes: 4 additions & 0 deletions man/oci-runtime-tool-generate.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ read the configuration from `config.json`.
Drop hugepage rsource limits. Just need to specify PAGESIZE. e.g. --linux-hugepage-limits-drop=4MB
This option can be specified multiple times.

**--linux-intelRdt-closid**=""
RDT Class of Service, i.e. group under the resctrl pseudo-filesystem, which
to associate the container with.

**--linux-intelRdt-l3CacheSchema**=""
Specifies the schema for L3 cache id and capacity bitmask.

Expand Down