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

[NativeAOT] Implement thin locks #75108

Closed
VSadov opened this issue Sep 6, 2022 · 3 comments · Fixed by #79519
Closed

[NativeAOT] Implement thin locks #75108

VSadov opened this issue Sep 6, 2022 · 3 comments · Fixed by #79519
Assignees
Milestone

Comments

@VSadov
Copy link
Member

VSadov commented Sep 6, 2022

CoreClr is able to use object header bits for locking in trivial cases. That makes typical use of lock fairly cheap. NativeAOT does not have that and lock(obj) is always a "fat lock".

This is likely the reason for regressions in ConcurrentDictionary benchmarks.
(re: #68891)

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Sep 6, 2022
@VSadov VSadov added this to the Future milestone Sep 6, 2022
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Sep 6, 2022
@VSadov VSadov modified the milestones: Future, 8.0.0 Sep 16, 2022
@tomcashman
Copy link

Where would be a starting point for this? I’d be interested in attempting an implementation to improve concurrency performance on our console ports.

@VSadov VSadov self-assigned this Dec 1, 2022
@VSadov
Copy link
Member Author

VSadov commented Dec 1, 2022

@tomcashman this is already in progress, sorry.
There is already an implementation at a stage where I know it is correct (as in "passing all tests"), but I do not know yet if the perf is acceptable.

@tomcashman
Copy link

No worries I’ll keep an eye out for the PR and we can test performance on consoles 😄

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Dec 12, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Dec 15, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jan 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants