opencontainers / runtime-spec

OCI Runtime Specification
http://www.opencontainers.org
Apache License 2.0
3.13k stars 535 forks source link

config: add annotation for exec isolated CPU affinity #1252

Closed bartwensley closed 1 month ago

bartwensley commented 1 month ago

The runc container runtime recently introduced functionality to direct exec operations to the first isolated CPU in a container cgroup cpuset. This is enabled through a new runc specific container annotation: org.opencontainers.runc.exec.isolated-cpu-affinity-transition

See https://github.com/opencontainers/runc/commit/afc23e3397 for the details.

This new functionality is also required in the crun container runtime and will be added soon. This purpose of this commit is to add a new annotation to the OCI runtime specification that would be used by any runtime that implements this new functionality: org.opencontainers.runtime.exec.isolated-cpu-affinity-transition

The runc implementation should switch to using the new annotation once it is accepted.

tianon commented 1 month ago

Agree -- a runtime-specific annotation seems like a really great way for one runtime to experiment with adding functionality like this before it's fully standardized or proven out, but as soon as it's something desirable for interoperability, it seems worth making a proper "feature" instead.

bartwensley commented 1 month ago

I am abandoning this in favor of https://github.com/opencontainers/runtime-spec/pull/1253