Closed codefromthecrypt closed 1 year ago
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: codefromthecrypt, sanposhiho
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Thanks for having this as well as some discussion. I'm glad that, even though we're entering the jungle of complex preemption area, we have some clear insights about problems to solve
Thanks, @sanposhiho I learned a lot too, and any tricks to identify pre-emption sound really useful. I think we'll end up revisiting the design a couple times at least, especially when we get pre-emption tests in!
What type of PR is this?
/kind bug
What this PR does / why we need it:
Before, we used the UID to identify which cycle is in progress. However, when a scheduling cycle fails, the same UID can happen the next time.
This uses the pointer instead as this is different per run, and easier to compare in wasm. We use the lower bits as that's likely to not conflict, easier to use in wasm, and also can't identify fully the real host memory address.
Finally, this resets the pointer between benchmark runs. This makes sure a run isn't accidentally faster. Before, it was faster due to colliding on the same UID. By resetting the pointer, we avoid re-creating that issue.
Which issue(s) this PR fixes:
NONE
Special notes for your reviewer:
I noticed curious results in the prior PR. The current results look a lot more realistic
Does this PR introduce a user-facing change?
NONE
What are the benchmark results of this change?