balloons: support affinity to extended resources from device plugins#720
Open
askervin wants to merge 4 commits into
Open
balloons: support affinity to extended resources from device plugins#720askervin wants to merge 4 commits into
askervin wants to merge 4 commits into
Conversation
Enable CPU selection based on locality of individual container's physical devices. podresourceapi:<resource> syntax allows specifying which physical device(s) is preferred to be local to container's CPUs. In order to allocate all container's CPUs near container's physical device, the container must be placed into a new balloon. Technically, this changes balloon creation internals: so far CPU selection to a new balloon has been affected by balloon types and instances only, but after this change the first container put into a new balloon may affect it, too. Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
askervin
force-pushed
the
5iG-balloons-podresources
branch
from
July 22, 2026 15:39
7420a1c to
ed093c0
Compare
klihub
reviewed
Jul 27, 2026
klihub
left a comment
Collaborator
There was a problem hiding this comment.
Looks good to me. My minor nit is related to an existing interface.
| for id := range numas { | ||
| numaIDs = append(numaIDs, strconv.FormatInt(id, 10)) | ||
| } | ||
| cpuStr := p.options.System.NodeHintToCPUs(strings.Join(numaIDs, ",")) |
Collaborator
There was a problem hiding this comment.
nit: if we split out the cpuset construction bits from sysfs.System.NodeHintToCPUs() as sysfs.System.NodeHintToCPUSets() we woudn't need to construct a cpuset, convert it to a string, then parse it to a cpuset again here. Or, since before this PR it is only used in one place, we can also change the existing function to return the resulting CPUSet instead of its string representation and update the existing call site.
klihub
approved these changes
Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
preferCloseToDevices supports "podresourceapi:example.com/device"
Enable CPU selection based on locality of individual container's physical devices. podresourceapi:RESOURCE syntax allows specifying which physical device(s) (matching logical resources to given glob-expression) is preferred to be local to container's CPUs.
In order to allocate all container's CPUs near container's physical device, the container must be placed into a new balloon. Technically, this changes balloon creation internals: so far CPU selection to a new balloon has been affected by balloon types and instances only, but after this change the first container put into a new balloon may affect it, too.