Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mini] Use atomics instead of loader lock for JIT wrappers and trampolines #104038

Merged
merged 4 commits into from
Jun 27, 2024

Conversation

lambdageek
Copy link
Member

Related to #93686

While this doesn't eliminate all deadlocks related to the global loader lock and managed locks, it removes one unneeded use of the loader lock.

The wrapper (and trampoline) of a JIT icall are only ever set from NULL to non-NULL. We can use atomics to deal with races instad of double checked locking. This was not the case historically, because the JIT info was dynamically allocated - so we used the loader lock to protect the integrity of the hash table

Related to dotnet#93686

While this doesn't eliminate all deadlocks related to the global
loader lock and managed locks, it removes one unneeded use of the
loader lock.

The wrapper (and trampoline) of a JIT icall are only ever set from
NULL to non-NULL.  We can use atomics to deal with races instad of
double checked locking.  This was not the case historically, because
the JIT info was dynamically allocated - so we used the loader lock to
protect the integrity of the hash table
@lambdageek
Copy link
Member Author

@kg this is the same as #100925 - basically the same but cleaned up a bit and I want ot get it in this time

@lambdageek
Copy link
Member Author

Are the WASM timeouts expected?

@steveisok
Copy link
Member

Are the WASM timeouts expected?

I've been seeing them a lot more frequently, yes. This is the most wonderful time of the year when it comes to our test queues being backed up.

@lambdageek lambdageek merged commit 55f2bc6 into dotnet:main Jun 27, 2024
71 of 79 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants