Skip to content

Commit f69bf73

Browse files
committed
KEP-4815 DRA Partitionable devices design update
1 parent e53812e commit f69bf73

File tree

2 files changed

+26
-12
lines changed

2 files changed

+26
-12
lines changed

keps/sig-node/4815-dra-partitionable-devices/README.md

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,16 @@ The basic idea is the following:
267267
footprint of each device when a common set of attributes and capacities can
268268
be applied. The mixins themselves are introduced as a list of top-level
269269
objects directly next to the list of `Devices` inside a `ResourceSlice`.
270-
They are not allocatable on their own.
270+
They are not allocatable on their own. Entries in the `Includes` list can
271+
reference mixins in any `ResourceSlice` in the same pool. References to
272+
mixins in other pools are not allowed.
271273

272274
1. The `ConsumesCapacityFrom` field contains a list of *other* devices where the
273275
capacity of the current device should be consumed if the scheduler decides
274276
to allocate it. This essentially removes that capacity from any referenced
275-
devices, rendering them unallocatable on their own.
277+
devices, rendering them unallocatable on their own. Entries in the
278+
`ConsumesCapacityFrom` list can reference devices in any `ResourceSlice` in
279+
the same pool. References to devices in other pools are not allowed.
276280

277281
With these additions in place, the scheduler has everything it needs to support
278282
the dynamic allocation of both full devices and their (possibly overlapping)
@@ -385,11 +389,16 @@ type CompositeDevice struct {
385389
//
386390
// The propertes of each included mixin are applied to this device in
387391
// order. Conflicting properties from multiple mixins are taken from the
388-
// last mixin listed that contains them.
392+
// last mixin listed that contains them. Properties set on the device will
393+
// always override properties from mixins.
394+
//
395+
// The mixins referenced here must be defined in the same pool as the
396+
// current device, but can be defined in any ResourceSlice within the pool.
389397
//
390398
// The maximum number of mixins that can be included is 8.
391399
//
392400
// +optional
401+
// +listType=atomic
393402
Includes []DeviceMixinRef `json:"includes,omitempty"`
394403

395404
// ConsumesCapacityFrom defines the set of devices where any capacity
@@ -399,10 +408,14 @@ type CompositeDevice struct {
399408
//
400409
// Conflicting capacities from multiple devices are taken from the
401410
// last device listed that contains them.
411+
//
412+
// The devices referenced here must be defined in the same pool as the
413+
// current device, but can be defined in any ResourceSlice within the pool.
402414
//
403-
// The maximum number of devices that can be referenced is 8.
415+
// Only a single entry is allowed. This might be extended in the future.
404416
//
405417
// +optional
418+
// +listType=atomic
406419
ConsumesCapacityFrom []DeviceRef `json:"consumesCapacityFrom,omitempty"`
407420

408421
// Attributes defines the set of attributes for this device.
@@ -618,20 +631,15 @@ follows:
618631
"sink" of capacity, pulling from "source" devices in order to satisfy its
619632
own capacity when allocated.
620633

621-
The scheduler must track the available capacity from all "source" devices, and
634+
The scheduler must track the availablity of the "source" device, and
622635
pull from it whenever it decides to allocate a "sink" device.
623636

624637
So long as no other devices have been allocated that reference a given "source"
625638
device in their `ConsumesCapacityField`, it is free to be allocated by the
626639
scheduler. However, as soon as its capacity has been pulled down by any given
627640
"sink" device, it can no longer be allocated until its capacity is freed again.
628641

629-
Likewise, so long as all of the advertised capacity of a "sink" device can be
630-
satisfied by the set of "source" devices it references in its
631-
`ConsumesCapacityFrom` field, it is free to be allocated by the scheduler.
632-
However, if any of its advertised capacity cannot be satisfied by one of its
633-
referenced "source" devices, then it cannot be allocated until that capacity is
634-
freed by some other device.
642+
Likewise, a "sink" device can be allocated if it's "source" device is available.
635643

636644
Note that in order to support nested partitioning, a "sink" device *may*
637645
provide a reference to another "sink" device in its `ConsumesCapacityFrom`
@@ -647,7 +655,12 @@ When such a device is allocated, the scheduler will need to track the full
647655
capacity required to satisfy each of the sink devices along the chain. In this
648656
way, all intermediate sink devices will essentially be rendered
649657
"unschedulable", with the last-level sink device pulling its capacity from the
650-
devices it references directly.
658+
device it references directly.
659+
660+
The API defines the `ConsumesCapacityFrom` field as a list of `DeviceRef` entries.
661+
While we only allow a single entry in this list, effectily forcing the partitioning
662+
of a device to form a tree of devices that consumes capacity, this can be extended
663+
in the future to allow a device to reference multiple "source" devices.
651664

652665
### Putting it all together for the MIG use-case
653666

keps/sig-node/4815-dra-partitionable-devices/kep.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ title: DRA Partitionable Devices
22
kep-number: 4815
33
authors:
44
- "@klueska"
5+
- "@mortent"
56
owning-sig: sig-node
67
participating-sigs:
78
- sig-scheduling

0 commit comments

Comments
 (0)