runtime-spec icon indicating copy to clipboard operation
runtime-spec copied to clipboard

Add support for windows CPU affinity

Open kiashok opened this issue 1 year ago • 7 comments

This PR adds support for certain CRI fields in OCI runtime spec for supporting CPU affinity for windows containers.

CRI PR : https://github.com/kubernetes/kubernetes/pull/124285 Github issue: https://github.com/kubernetes/kubernetes/issues/125262 KEP: https://github.com/kubernetes/kubernetes/issues/125262

kiashok avatar Jun 20 '24 23:06 kiashok

cc @jsturtevant @kevpar @aravindhp @marosset

kiashok avatar Jun 20 '24 23:06 kiashok

@AkihiroSuda @thaJeztah could you please take a look? :) thanks!

kiashok avatar Jun 20 '24 23:06 kiashok

Is there a compelling reason not to roughly match the naming convention adopted for Linux in #1253?

Also, please don't mark conversations with useful discussion/links as "resolved" especially if the PR itself didn't change as a result of the discussion but the discussion is still useful and potentially something someone else might reasonably ask about or want to discuss -- it makes them much more difficult to discover when reading the PR's comments.

tianon avatar Jun 28 '24 02:06 tianon

Is there a compelling reason not to roughly match the naming convention adopted for Linux in #1253?

For cpu's, Linux is a simple list where as on windows it is a bitmap with a group number (https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/miniport/ns-miniport-_group_affinity) and the naming/structure was used to map to those Windows specific concepts

For memory, I think it was the same idea, making sure it was known this is "perferred" but not guarenteed do to the Windows API's. Depending on outcome of https://github.com/opencontainers/runtime-spec/pull/1258#discussion_r1648430504 we might not have this field

jsturtevant avatar Jul 09 '24 15:07 jsturtevant

@AkihiroSuda @kevpar addressed review comments. Would you be able to take a look when you have some time please? Thanks!

kiashok avatar Sep 17 '24 19:09 kiashok

@tianon @kolyshkin @kevpar @jsturtevant could you please take a look at this PR when you have some time please? Thanks!

kiashok avatar Oct 20 '24 14:10 kiashok

/lgtm for the functionality, I will defer to the reviewers here on the naming discussion

jsturtevant avatar Oct 21 '24 15:10 jsturtevant

@tianon @kolyshkin @AkihiroSuda @thaJeztah could you please take a look when you have a chance please? thanks!

kiashok avatar Nov 13 '24 16:11 kiashok

LGTM

@tianon @kevpar @kolyshkin could you give a final look?

jsturtevant avatar Dec 03 '24 23:12 jsturtevant

A couple really minor nits, but I think this is probably fine.

Maybe we need to update the JSON schema also?

https://github.com/opencontainers/runtime-spec/blob/09fcb39bb7185b46dfb206bc8f3fea914c674779/schema/config-windows.json#L30-L43

Addressed this!

kiashok avatar Dec 16 '24 18:12 kiashok

@tianon would you be able to take a look at this PR when you have a chance please? Thanks!

kiashok avatar Dec 26 '24 18:12 kiashok

LGTM

jsturtevant avatar Jan 06 '25 17:01 jsturtevant