Skip to content

Consider supporting parallel calls to PrepareResourceClaims() #172

Description

@pravk03

Currently, the CPU allocations in the drive is not atomic. If PrepareResourceClaims calls were to run concurrently, two claims could both read the CPU allocation store and write overlapping CPU assignments.

However, this is not an immediate issue because the kubelet currently serializes all PrepareResourceClaims calls by default, and we do not modify this in the driver code (kubeletOpts). In the future, if we decide to disable serialization and support concurrent calls (by setting kubeletplugin.Serialize(false)), we will need to introduce synchronization mechanisms in pkg/driver/dra_hooks.go.

Kubelet code for reference:

  • The serialization default is enabled here
  • The serial lock is acquired here before calling PrepareResourceClaims.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions