Repository navigation
Speed up restore placement by checking cpu_features last - #4103
Abhay Joshi (abhayjoshi201) wants to merge 2 commits into
Conversation
matchesCompat parsed each worker's cpu_features before comparing the other attributes, so a worker with another architecture or bundle paid for the parse before it was rejected. Compare the exact-match attributes first, and return early when the worker's cpu_features string equals the snapshot's. Workers on the same CPU platform and runsc build report the same string. Signed-off-by: Abhay Joshi <[email protected]>
|
The e2e (envoy, gvisor) failure is the #4008 flake: TestRequestParking/BudgetExhaustion failed with "another operation is in progress for this actor". The other e2e lanes passed. Could someone rerun the failed jobs? I don't have permission to rerun them from my fork. Shrutiya Mohan (@shrutiyam-glitch) this is ready for a look when you have time. |
Shrutiya Mohan (shrutiyam-glitch)
left a comment
There was a problem hiding this comment.
Could someone rerun the failed jobs?
Amending and force-pushing (e.g. git commit --amend --no-edit && git push --force-with-lease) will re-trigger the full CI suite.
Currently, only a maintainer with write access can rerun just the failed job directly
| } | ||
| // Workers on the same CPU platform and runsc build report the same | ||
| // string, and the snapshot's is already known to be canonical. | ||
| if wv == snapCPU { |
There was a problem hiding this comment.
🤖 nit 🟢 – The wv == snapCPU shortcut relies on r.badCPUFeatures having already rejected non-canonical or invalid snapshot masks, so equal invalid masks on both sides still fail. None of the existing rows in TestMatchesCompat (internal/hardware/hardware_test.go:138-141) pass the same invalid or non-canonical value on both worker and snapshot. Consider adding a row (for example "07" on both sides) to pin that guard.
There was a problem hiding this comment.
Added a row with "07" on both sides. I checked it fails if the badCPUFeatures check is removed. The push also re-ran CI.
The equal-string shortcut in matchesCompat relies on the badCPUFeatures check rejecting the snapshot's value first. Signed-off-by: Abhay Joshi <[email protected]>
The scheduler parsed every worker's
cpu_featureswhen placing an actor from a memory snapshot, even for workers rejected on another attribute, and even when the strings were identical.matchesCompatnow compares the exact-match attributes first. Forcpu_featuresit returns early when the worker's string equals the snapshot's, and only parses the mask when they differ. Matching results don't change, so the existingTestMatchesCompatrows cover it.A local
matchesCompatbenchmark (not included, benchstat over 8 runs):cpu_featuresFixes #3924
AI use: AI-assisted for implementation and benchmarking. I reviewed and tested the change.