DRA: publish topology-aware devices #820
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 415 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.361
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #820"
general
weight: 0.35
bart0sh
DRA topology-aware devices
NUMA nodes as DRA devices
Fifth PR of the DRA series. Two commits: the topology-aware policy publishes its NUMA nodes as DRA devices, then an e2e test that the devices publish correctly.
One device per NUMA node
Each node with CPUs we may hand out becomes a device named
cpudevnuma<NNN>after the node ID, withallowMultipleAllocationsand adra.cpu/cpucapacity (KEP-5075) equal to the node's share of the CPUs an exclusive grant can draw from: the root pool's static supply, isolated plus sharable, which already leaves out the reserved CPUs. A node with none of those, all reserved or with no CPUs at all, is left out.The request policy is
Default: 1withValidRange{Min: 1, Step: 1}, so a claim naming no amount takes one CPU rather than the whole node, and requests are whole CPUs.nodeAllocatableResourcesmaps the capacity tocpuwith multiplier 1 (KEP-5517), which lets the scheduler count claimed CPUs into the node's capacity; an API server without that gate drops the field silently.Attributes: the standard
resource.kubernetes.io/numaNodeas a scalar int, plusdra.cpu/socketIDfrom the node's package anddra.cpu/smtEnabled.Devices are published from
Startand fromReconfigure. The policy keeps no copy to compare against: the resourceslice controller already leaves a slice alone when its devices did not change, so republishing the same devicescosts no API write. A publish failure fails
Start. InReconfigureit is logged instead, since the new configuration is in effect by then and past startup publishing only hands the devices to the controller.What is not here
AllocateClaimandReleaseClaimare still theErrNoDRAClaimsstubs, so the scheduler can allocate a claim on these devices but preparing it fails. The allocator, the accounting and theDeviceClassfollow in the next PRs. Untilthen the devices are observable but not usable, which is the cost of keeping the device model and the allocator in separate reviews.
Verification
go test ./...passes, and golangci-lint finds no issues.serversysfs, a two-package, four-node machine with SMT, two memory-only nodes and kernel-isolated CPUs: one device per node with the right CPUs counted, a node left out when it has no CPUs we may use, reserved CPUs subtracted, one whole device asserted field by field, andReconfigurerepublishing a reserved-CPU change.test42-dra-devices(n4c16): launches the policy with DRA on and CPU 15 reserved, waits for theResourceSlice, and checks one device per NUMA node, thenumaNode,socketIDandsmtEnabledattributes, thedra.cpu/cpucapacity of exactly 4, 4, 4 and 3 and its request policy,allowMultipleAllocations, andnodeAllocatableResourceswhen the API server keeps it. The slice is fetched once and each device is looked up byname, so a node left out cannot shift the others. A slice with no devices fails the test rather than passing for one without the gate. No claim or pod:
AllocateClaim/ReleaseClaimstill fail, so nothing can be claimed against these devices yet. Ran on gated VM (PASS) and on an ungated VM (clean SKIP,DRAConsumableCapacityoff). This e2e test does not run in CI.