Skip to content

Commit e04a90e

Browse files
committed
cmd/oci-runtime-tool: new flags for linux.intelRdt
Introduce --linux-intelRdt-schema and --linux-intelRdt-enableMonitoring flags for the oci-runtime-tool generate. Signed-off-by: Markus Lehtonen <[email protected]>
1 parent 0ea5ed0 commit e04a90e

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

cmd/oci-runtime-tool/generate.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ var generateFlags = []cli.Flag{
5555
cli.StringSliceFlag{Name: "linux-hugepage-limits-add", Usage: "add hugepage resource limits"},
5656
cli.StringSliceFlag{Name: "linux-hugepage-limits-drop", Usage: "drop hugepage resource limits"},
5757
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"},
58+
cli.BoolFlag{Name: "linux-intelRdt-enableMonitoring", Usage: "Enable resctrl monitoring for the container"},
59+
cli.StringSliceFlag{Name: "linux-intelRdt-schema", Usage: "Specifies the resctrl schema. May be specified multiple times to set multiple schemata."},
5860
cli.StringFlag{Name: "linux-intelRdt-l3CacheSchema", Usage: "specifies the schema for L3 cache id and capacity bitmask"},
5961
cli.StringSliceFlag{Name: "linux-masked-paths", Usage: "specifies paths can not be read inside container"},
6062
cli.Uint64Flag{Name: "linux-mem-kernel-limit", Usage: "kernel memory limit (in bytes)"},
@@ -749,6 +751,12 @@ func setupSpec(g *generate.Generator, context *cli.Context) error {
749751
if context.IsSet("linux-intelRdt-closid") {
750752
g.SetLinuxIntelRdtClosID(context.String("linux-intelRdt-closid"))
751753
}
754+
if context.IsSet("linux-intelRdt-enableMonitoring") {
755+
g.SetLinuxIntelRdtEnableMonitoring(context.Bool("linux-intelRdt-enableMonitoring"))
756+
}
757+
if context.IsSet("linux-intelRdt-schema") {
758+
g.SetLinuxIntelRdtSchemata(context.StringSlice("linux-intelRdt-schema"))
759+
}
752760

753761
if context.IsSet("linux-intelRdt-l3CacheSchema") {
754762
g.SetLinuxIntelRdtL3CacheSchema(context.String("linux-intelRdt-l3CacheSchema"))

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,13 @@ read the configuration from `config.json`.
201201
RDT Class of Service, i.e. group under the resctrl pseudo-filesystem, which
202202
to associate the container with.
203203

204+
**--linux-intelRdt-enableMonitoring**=""
205+
Enable resctrl monitoring for the container.
206+
207+
**--linux-intelRdt-schema**=[]
208+
Specifies one resctrl schema. May be specified multiple times to configure the complete schemata.
209+
e.g. --linux-intelRdt-schemata="MB:0=80" --linux-intelRdt-schemata="L3:0=ff"
210+
204211
**--linux-intelRdt-l3CacheSchema**=""
205212
Specifies the schema for L3 cache id and capacity bitmask.
206213

0 commit comments

Comments
 (0)