-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Some refactoring of thread suspension. #34666
Merged
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
69a7c52
m_dwForbidSuspendThread
VSadov 42a7724
Remove some fibers stuff
VSadov 1c638ab
g_TrapReturningThreads
VSadov 8e5552f
g_pGCSuspendEvent
VSadov 84ba563
m_pThreadAttemptingSuspendForGC
VSadov 7d07d08
refactor SuspendRuntime into just one loop
VSadov 8b94660
Suspend iteration after updating hijacks should "observeOnly" - no po…
VSadov fb96a82
avoid retrying to suspend threads that are already in redirected state.
VSadov 2eccc8a
PR feedback
VSadov 06fac28
"premptive" - common typo apparently
VSadov 4f607d4
missing profiler notification on suspend end and `DisableStressHeap` …
VSadov ecaa594
indentation and infinite loop style
VSadov 480225d
Removed GTF_DONT_CSE flag on `g_TrapReturningThreads` load in GCPoll …
VSadov 18eadb4
reverted an accidentally removed assert
VSadov 46dc216
removed SWITCHOUT_HANDLE_VALUE entirely - not different from INVALID_…
VSadov 47acd9c
some cleanups and more comments when non-GC suspension yields to GC
VSadov 6f49f33
Few tweaks for the concerns discussed in the PR
VSadov 61b6665
On Server GC `pCurThread` is NULL.
VSadov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
m_dwForbidSuspendThread
- Loading branch information
commit 69a7c527aa42f5d78de5e9151dc7509f6eb13053
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another way of looking at this is to consider the following scenario:
The part that
m_dwForbidSuspendThread
isVolatile
is not helping. It is not necessary in other places where we read it from the current thread of from a suspended thread, and it is not sufficient here. When two live threads try to coordinate their forbids, they need to make sure that the reads do not happen earlier than writes.InterlockedOr
is a one way to provide that. Full memory fence immediately before the read could be another option.I did not remove
Volatile
fromm_dwForbidSuspendThread
, though it does not seems very useful. #Resolved