@@ -72,7 +72,6 @@ SIG Architecture for cross-cutting KEPs).
72
72
- [ Cluster add-on development] ( #cluster-add-on-development )
73
73
- [ Cluster configuration] ( #cluster-configuration )
74
74
- [ Partial GPU allocation] ( #partial-gpu-allocation )
75
- - [ Co-locating devices based on hardware topology] ( #co-locating-devices-based-on-hardware-topology )
76
75
- [ Publishing node resources] ( #publishing-node-resources )
77
76
- [ Devices as a named list] ( #devices-as-a-named-list )
78
77
- [ Using structured parameters] ( #using-structured-parameters )
@@ -499,42 +498,6 @@ The lifecycle of the allocation is tied to the lifecycle of the Pod.
499
498
500
499
In production, a similar PodTemplateSpec in a Deployment will be used.
501
500
502
- # ### Co-locating devices based on hardware topology
503
-
504
- As a user, I want to easily request multiple devices (like a CPU and a NIC) that
505
- are physically connected to the same CPU in the system's hardware.
506
-
507
- For instance, in a multi-CPU (also known as multi-socket) system, I'd prefer
508
- that a requested NIC is attached to the CPU being allocated to improve
509
- performance by avoiding costly inter-CPU interconnects.
510
-
511
- I'll define a `ResourceClaim` for my workload, specifying constraints with
512
- ` MatchAttribute` to ensure the devices share the same underlying hardware
513
- characteristics
514
-
515
- ```
516
- apiVersion: resource.k8s.io/v1beta1
517
- kind: ResourceClaim
518
- metadata:
519
- name: cpu-with-aligned-nic
520
- spec:
521
- devices:
522
- requests:
523
- - name: cpu-request
524
- deviceClassName: cpu.vendor1.com # This is a hypothetical CPU device class
525
- - name: nic-request
526
- deviceClassName: nic.vendor2.com # This is a hypothetical NIC device class
527
- constraints:
528
- - requests: [ "cpu-request", "nic-request"]
529
- matchAttribute: k8s.io/cpuSocketNumber
530
- ```
531
-
532
- I'll use one of the standard attributes provided by Kubernetes, choosing between
533
- `k8s.io/cpuSocketNumber` or `k8s.io/pcieRoot` depending on my specific alignment
534
- needs. I know that even if my CPU and NIC are managed by different DRA drivers,
535
- they are likely publishing the information I can use for alignment through these
536
- standard attributes.
537
-
538
501
# ## Publishing node resources
539
502
540
503
The devices available on a node need to be published to the API server. In
@@ -618,11 +581,10 @@ specific resource for allocation on a node.
618
581
We are reserving the `k8s.io/` domain (and subdomains) prefix for attributes and
619
582
capacities for standardization by the Kubernetes project. This reservation
620
583
allows us to define common attributes that can describe hardware characteristics
621
- across resources from different vendors. Currently, we are defining two such
622
- standard attributes: ` k8s.io/cpuSocketNumber ` and ` k8s.io/pcieRoot ` . Details on
623
- their meaning and how they should be exposed by DRA drivers are available in the
624
- [ API design section under ResourceSlice's] ( #resourceslice ) QualifiedName
625
- definition.
584
+ across resources from different vendors. Currently, we are defining one such
585
+ standard attribute : ` k8s.io/pcieRoot` . Details on its meaning and how it should
586
+ be exposed by DRA drivers are available in the [API design section under
587
+ ResourceSlice's](#resourceslice) QualifiedName definition.
626
588
627
589
**Note:** If a driver needs to remove a device or change its attributes,
628
590
then there is a risk that a claim gets allocated based on the old
@@ -1272,20 +1234,9 @@ const ResourceSliceMaxAttributesAndCapacitiesPerDevice = 32
1272
1234
// a standard attribute (or capacity) name. This ensures consistency and
1273
1235
// interoperability across different drivers when conveying the same idea.
1274
1236
//
1275
- // Currently, the two standard attributes are:
1276
- //
1277
- // 1. `k8s.io/cpuSocketNumber`: An integer value referring to the logical
1278
- // identifier assigned by the operating system for the physical CPU socket
1279
- // that a device is associated with. For a PCIe device, DRA drivers can
1280
- // determine this value by first reading its associated NUMA node from
1281
- // `/sys/bus/pci/devices/<PCI_ADDRESS>/numa_node`. Then, using that NUMA
1282
- // node, the value for `cpuSocketNumber` can be found by reading the
1283
- // `physical_package_id` from any CPU within that node (e.g.,
1284
- // `/sys/devices/system/node<NUMA_NODE>/cpuX/topology/physical_package_id`).
1285
- // Similarly, for a logical CPU X, its `cpuSocketNumber` can be identified
1286
- // from `/sys/devices/system/cpu/cpuX/topology/physical_package_id`.
1237
+ // Currently, the following standard attribute has been defined:
1287
1238
//
1288
- // 2 . `k8s.io/pcieRoot`: A string value in the format `pci<domain>:<bus>`,
1239
+ // 1 . ` k8s.io/pcieRoot`: A string value in the format `pci<domain>:<bus>`,
1289
1240
// referring to a PCIe (Peripheral Component Interconnect Express) Root
1290
1241
// Complex. This attribute can be used to identify devices that share the
1291
1242
// same PCIe Root Complex. DRA drivers MAY determine this value by
0 commit comments