kubernetes-sigs / kube-scheduler-wasm-extension

All the things to make the scheduler extendable with wasm.
Apache License 2.0
110 stars 22 forks source link

fix(host): remove lock from Score #37

Closed sanposhiho closed 1 year ago

sanposhiho commented 1 year ago

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

The scheduling framework doesn't call Score() of the same plugin in parallel. So, we don't need to have pl.pool.assignedToSchedulingPodLock.Lock(), it's the lock to protect the guest from using at the same time.

ref: https://github.com/kubernetes/kubernetes/blob/be14b026e33b682c52750741a2256373e480b7d7/pkg/scheduler/framework/runtime/framework.go#L1037

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

What are the benchmark results of this change?

(trivial)
kerthcet commented 1 year ago

/lgtm /approve

k8s-ci-robot commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: codefromthecrypt, kerthcet, sanposhiho

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/kube-scheduler-wasm-extension/blob/main/OWNERS)~~ [kerthcet,sanposhiho] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment