Skip to content

Conversation

@tannergooding
Copy link
Member

This resolves #66873

@github-actions github-actions bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jul 8, 2025
@dotnet-policy-service dotnet-policy-service bot added the linkable-framework Issues associated with delivering a linker friendly framework label Jul 8, 2025
@jkotas
Copy link
Member

jkotas commented Aug 3, 2025

Does this instruction require special handling in thread suspension to avoid GC starvation? For example, if the program executes this instruction in a non-interruptible loop, can it lead to thread suspension hang?

@tannergooding
Copy link
Member Author

tannergooding commented Aug 3, 2025

Does this instruction require special handling in thread suspension to avoid GC starvation? For example, if the program executes this instruction in a non-interruptible loop, can it lead to thread suspension hang?

Yes, most likely.

The upper limit is dictated by the OS and can be 0 (no limit) or any 32-bit value where the lower two bits are cleared, defining the number of TSC units (e.g. 4, 8, .., 4294967292 TSC).

There's something in Mono blocking this which I've not finished looking at as well.


I don't plan on getting to this for .NET 10 at this point, we'll wait for .NET 11 and ideally take advantage of it in the runtime where applicable.

@dotnet-policy-service
Copy link
Contributor

Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI linkable-framework Issues associated with delivering a linker friendly framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using UMONITOR, UMWAIT, TPAUSE in CLR and exposing in Intel specific hardware intrinsics

2 participants