mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-17 23:36:03 +00:00
Automatic merge from submit-queue (batch tested with PRs 58302, 58782, 58555, 58741). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Change equivalence class hashing function **What this PR does / why we need it**: This updates the Pod equivalence class hashing function to hash pod fields which are read by scheduler predicates. Until now, we used a pod's OwnerReference as a shorthand for equivalence, but not all controllers will create homogeneous sets of pods. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: /ref #58222 **Performance impact**: Hashing is not expensive enough to impact scheduling performance. |Test|Result| |---|---| | Before | `BenchmarkEquivalenceHash-40 200000 7722 ns/op` | | After | `BenchmarkEquivalenceHash-40 10000 114184 ns/op` | **Special notes for your reviewer**: **Release note**: ```release-note NONE ``` /sig scheduling