Repository navigation
Conversation
bart0sh
marked this pull request as draft
October 27, 2026 13:04
bart0sh
force-pushed
the
stacked/bart0sh/DRA/016-tree-devices
branch
from
October 27, 2026 13:44
cb238b9 to
f6f00b9
Compare
bart0sh
force-pushed
the
stacked/bart0sh/DRA/016-tree-devices
branch
from
October 28, 2026 11:02
f6f00b9 to
1493307
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Incorrect migration-headroom accounting can reject NUMA claims despite advertised capacity, while unfiltered PCIe-root advertising can expose sockets with no grantable CPUs.
2 open issues
What changed in this PR
Extends topology-aware DRA support with a machine-wide CPU device, building on socket-level allocation and claim migration.
Changes:
- Publishes
cpudevmachinewith level-specific attributes and deduplicated PCIe roots. - Extends capacity accounting and claim migration across NUMA, socket, and machine levels.
- Updates documentation, unit tests, and end-to-end coverage for machine claims and chained moves.
| File | Description |
|---|---|
test/e2e/policies.test-suite/topology-aware/n4c16/test48-dra-socket-devices/machine-claim.yaml.in |
Adds a machine-level claim template. |
test/e2e/policies.test-suite/topology-aware/n4c16/test48-dra-socket-devices/code.var.sh |
Tests machine capacity, cross-socket allocation, and chained migration. |
test/e2e/policies.test-suite/topology-aware/n4c16/test42-dra-devices/code.var.sh |
Updates the expected device count. |
docs/resource-policy/policy/topology-aware.md |
Documents machine devices, selectors, and migration behavior. |
cmd/plugins/topology-aware/policy/topology-aware-policy.go |
Initializes topology CPU groups during setup. |
cmd/plugins/topology-aware/policy/dra.go |
Implements machine devices and recursive claim migration. |
cmd/plugins/topology-aware/policy/dra_test.go |
Adds coverage for machine devices, attributes, capacity, and migration rollback. |
Review effort: Balanced
bart0sh
force-pushed
the
stacked/bart0sh/DRA/016-tree-devices
branch
from
October 29, 2026 10:30
1493307 to
baad308
Compare
bart0sh
force-pushed
the
stacked/bart0sh/DRA/016-tree-devices
branch
from
October 29, 2026 11:51
baad308 to
71bae60
Compare
bart0sh
force-pushed
the
stacked/bart0sh/DRA/016-tree-devices
branch
from
October 29, 2026 12:43
71bae60 to
fc38e72
Compare
bart0sh
force-pushed
the
stacked/bart0sh/DRA/016-tree-devices
branch
from
October 30, 2026 10:53
fc38e72 to
bf8d8eb
Compare
bart0sh
force-pushed
the
stacked/bart0sh/DRA/016-tree-devices
branch
from
October 30, 2026 12:36
bf8d8eb to
e1e327e
Compare
bart0sh
force-pushed
the
stacked/bart0sh/DRA/016-tree-devices
branch
2 times, most recently
from
October 30, 2026 14:20
bb6a314 to
9b55bd6
Compare
There was a problem hiding this comment.
🟡 Changes recommended
CPU selection can unnecessarily span NUMA nodes despite a suitable memoryless node, and failed rollback attempts can leave claims displaced because restoration dependencies are not retried.
2 open issues
1 resolved since last review
Review effort: Balanced
bart0sh
force-pushed
the
stacked/bart0sh/DRA/016-tree-devices
branch
from
November 2, 2026 10:44
9b55bd6 to
cf89a97
Compare
bart0sh
force-pushed
the
stacked/bart0sh/DRA/016-tree-devices
branch
from
November 2, 2026 11:55
cf89a97 to
70136ca
Compare
bart0sh
force-pushed
the
stacked/bart0sh/DRA/016-tree-devices
branch
2 times, most recently
from
November 2, 2026 13:42
2f1840d to
b6d9f44
Compare
bart0sh
force-pushed
the
stacked/bart0sh/DRA/016-tree-devices
branch
from
November 2, 2026 16:27
b6d9f44 to
6d66303
Compare
Publish a device for the machine next to the NUMA node and socket devices, also when it has the same CPUs as a socket. A NUMA node device has the IDs of its node and socket, a socket device the ID of its socket, and the machine device no IDs. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
When a claim moves for a claim on a smaller device, and the CPUs it could move to are held by claims on larger devices, move those claims out of its device first. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
A machine claim gets CPUs of both sockets, and moves out of a socket when a socket claim has to move there. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
bart0sh
force-pushed
the
stacked/bart0sh/DRA/016-tree-devices
branch
from
November 2, 2026 20:31
6d66303 to
a4a33d6
Compare
bart0sh
marked this pull request as ready for review
November 3, 2026 07:05
This branch has not been deployed
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.


topology-aware publishes a DRA device for each NUMA node and each socket. Now it also publishes
cpudevmachine, with levelmachine, which has all CPUs of the machine. A claim on it is for any number of CPUs, when it does not matter which socket or NUMA node they come from. The policy picks them from one NUMA node when one has enough free CPUs, otherwise from one socket, otherwise from several sockets. Every level is published, also when a group has the same CPUs as the one above it, as on a machine with one socket. So a claim written for one level works on every machine.The ID attributes of a device depend only on its level. A NUMA device has
numaNodeandsocketID, a socket device hassocketID, and the machine device has no IDs. This is also true when groups of different levels have the same CPUs, so a selector works the same way on every machine. Since the machine device has nosocketID, a selector onsocketIDchecks the level as well, as a selector onnumaNodealready does.A device lists the PCIe roots of each socket that has some of its CPUs. A root that belongs to several sockets is listed once.
The move from #875 now works for groups at any level. When a NUMA claim needs CPUs that a socket claim holds, and a machine claim holds the other CPUs of the socket, the machine claim moves out of the socket first, then the socket claim moves. If the NUMA claim still fails, every moved claim gets its old CPUs back.
Known issue, the same as in #875: a move updates running containers while the resource manager holds its lock. Until #871 merges, containerd can time out and drop the plugin.
Testing:
go test -race -count=1 ./cmd/plugins/topology-aware/... ./pkg/resmgr/...passes.