Skip to content

Conversation

@akaStiX
Copy link

@akaStiX akaStiX commented Feb 2, 2026

Replaced WFE instruction with ISB in mi_atomic_yield on ARM64 for non Windows as it significantly improves performance.
Also on one closed platform I ported mimalloc to, WFE resulted in an application freeze, because no even was generated to wake threads that were waiting with WFE

… Windows as it significantly improves performance
@daanx
Copy link
Collaborator

daanx commented Feb 3, 2026

Interesting PR. Mmm, it would be best if we didn't need atomic yield at all :-( Anyways, in v3 there is (almost) no use of atomic yield so that improves matters. In the other cases, the atomic yield is really used to signify that another thread needs to make progress for the current thread to advance. As such ISB (essentially a memory barrier) doesn't quite do that? WFE (wait for another thread event) seems more appropiate .. but then, you are seeing improved perfomance? Is that on v2 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants