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

Migrate coreclr's worker thread pool to be able to use the portable thread pool in opt-in fashion #38225

Merged
merged 48 commits into from
Oct 21, 2020

Commits on Oct 20, 2020

  1. Add dependencies

    - Added for coreclr: Unix implementation of LowLevelLifoSemaphore for coreclr, Thread.UninterruptibleSleep0(), Thread.IsThreadPoolThread setter, LowLevelLock
    - Moved LowLevelSpinWaiter from mono to shared, restored some functionality from CoreRT
    kouvel committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    da29c61 View commit details
    Browse the repository at this point in the history
  2. Add config var

    kouvel committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    423d830 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ad228ef View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1155fb0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6f9b3dc View commit details
    Browse the repository at this point in the history
  6. Fix timers, tiered compilation, introduced time-sensitive work item q…

    …ueue to simulate coreclr behavior
    kouvel committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    d792cd7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a911883 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    40ce9d0 View commit details
    Browse the repository at this point in the history
  9. Post wait completions to the IO completion port on Windows for corecl…

    …r, similarly to before
    kouvel committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    a5d3c2b View commit details
    Browse the repository at this point in the history
  10. Reroute managed gate thread into unmanaged side to perform gate activ…

    …ites, don't use unmanaged gate thread
    kouvel committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    ad632be View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    f942773 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    0ef2079 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    3151057 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    5d8d4ae View commit details
    Browse the repository at this point in the history
  15. Fix ETW events

    kouvel committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    3916619 View commit details
    Browse the repository at this point in the history
  16. Fix perf of counts structs

    kouvel committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    88ea9c4 View commit details
    Browse the repository at this point in the history
  17. Fix perf of dispatch loop

    kouvel committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    8ef63f9 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    e01df4f View commit details
    Browse the repository at this point in the history
  19. Miscellaneous perf fixes

    kouvel committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    7c89f81 View commit details
    Browse the repository at this point in the history
  20. Fix starvation heuristic

    kouvel committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    13c2d62 View commit details
    Browse the repository at this point in the history
  21. Implement worker tracking

    kouvel committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    dd23472 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    6cd2b2d View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    c8bdfad View commit details
    Browse the repository at this point in the history
  24. Port some tests from CoreRT

    kouvel committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    38c00d5 View commit details
    Browse the repository at this point in the history
  25. Fail-fast in thread pool native entry points specific to thread pool …

    …implementations based on config
    kouvel committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    0ff3b03 View commit details
    Browse the repository at this point in the history
  26. Fix SetMinThreads() and SetMaxThreads() to return true only when both…

    … changes are successful with synchronization
    kouvel committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    cc35f92 View commit details
    Browse the repository at this point in the history
  27. Fix registered wait removals for fairness since there can be duplicat…

    …e system wait objects in the wait array
    kouvel committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    79eb3b9 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    8b309cc View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    ac1917d View commit details
    Browse the repository at this point in the history
  30. Fix Browser build

    kouvel committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    73f911c View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    1b99da7 View commit details
    Browse the repository at this point in the history
  32. Fix build warning after merge

    kouvel committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    17b3d2d View commit details
    Browse the repository at this point in the history
  33. Address feedback for events, undo EventPipe change in mono, change ev…

    …ent source name in mono, add comments
    kouvel committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    e8043ff View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    8d9cc2d View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    f03709b View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    ff48985 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    93563e6 View commit details
    Browse the repository at this point in the history
  38. Address feedback

    kouvel committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    100dad7 View commit details
    Browse the repository at this point in the history
  39. Fix race condition in registered wait unregister

    - For a registered wait that is automatically unregistered (due to `executeOnlyOnce: true`), the registered wait handle gets added to the array of pending removals, and this automatic unregister does not wait for the removal to actually happen
    - If shortly after that a user calls `Unregister(null)` on the same registered wait handle, it is supposed to wait for the removal to actually happen, but was not because the handle is already in the array of pending removals
    - A `Dispose` on the wait handle shortly after `Unregister` returns would delete the safe handle and `DangerousRelease` upon removal would throw and crash the process
    - Fixed by waiting when a registered wait handle is pending removal, regardless of whether the caller of `Unregister` added the handle to the array of pending removals or if it was added by anyone else
    kouvel committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    4c7f778 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    d55c5fc View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    996597f View commit details
    Browse the repository at this point in the history
  42. Fix tests that use RemoteExecutor to include a test for whether it is…

    … supported, fix assert for browser builds
    kouvel committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    82f7cda View commit details
    Browse the repository at this point in the history
  43. Fix build

    kouvel committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    b53a5b9 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    7dcb267 View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    65840d8 View commit details
    Browse the repository at this point in the history
  46. Address feedback

    kouvel committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    fb28ad2 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    04326b6 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    ec038cf View commit details
    Browse the repository at this point in the history