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] Ensure that suspending thread priority is not below normal. #75112

Open
VSadov opened this issue Sep 6, 2022 · 3 comments
Open

Comments

@VSadov
Copy link
Member

VSadov commented Sep 6, 2022

GC could be caused by a low-priority thread.
It would help if the thread that performs the suspension and release of the runtime changes its priority temporarily to Normal.

@VSadov VSadov added this to the Future milestone Sep 6, 2022
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@jkotas
Copy link
Member

jkotas commented Sep 6, 2022

Is this NativeAOT-specific problem or is this a problem in regular CoreCLR too?

@VSadov
Copy link
Member Author

VSadov commented Sep 6, 2022

CoreClr does this. I think it is good to have in NativeAOT, but not necessarily in 7.0

// If this thread is running at low priority, boost its priority. We remember the old

Tweaking thread priorities is a rare scenario as it often causes unwanted consequences.
Even more rare is when a low-priority thread is the one who triggers GC (statistically it is the one who allocates the most). It is still good to have a precaution against other threads starving the one who tries to do suspend them.

In Workstation GC it is also the thread that does the actual GC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants