Skip to content

Commit 9732ac3

Browse files
authored
Merge pull request #374 from jgehrcke/jp/do-not-lock-prepare-unprepare
Configure DRA lib to send (un)prepare calls concurrently
2 parents b6f972d + 5dbaf74 commit 9732ac3

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

cmd/compute-domain-kubelet-plugin/driver.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ func NewDriver(ctx context.Context, config *Config) (*driver, error) {
7070
kubeletplugin.KubeClient(driver.client),
7171
kubeletplugin.NodeName(config.flags.nodeName),
7272
kubeletplugin.DriverName(DriverName),
73+
// By default, the DRA library serializes (un)prepare calls. That is, at
74+
// most one such call is exposed to the driver at any given time.
75+
// Disable that behavior: this driver has codependent prepare() actions
76+
// (where for the first prepare() to eventually complete, a second
77+
// prepare() must be incoming). Concurrency management for incoming
78+
// requests is done with this driver's work queue abstraction.
79+
kubeletplugin.Serialize(false),
7380
)
7481
if err != nil {
7582
return nil, err

cmd/gpu-kubelet-plugin/driver.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ func NewDriver(ctx context.Context, config *Config) (*driver, error) {
5252
kubeletplugin.KubeClient(driver.client),
5353
kubeletplugin.NodeName(config.flags.nodeName),
5454
kubeletplugin.DriverName(DriverName),
55+
kubeletplugin.Serialize(false),
5556
)
5657
if err != nil {
5758
return nil, err

0 commit comments

Comments
 (0)