-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move local thread pool work items to global by default when blocking …
…on a task (#112796) * Move local thread pool work items to global by default when blocking on a task - Enables the change in #109841 by default - A worker thread blocking on a task while having pending local work items can lead to priority inversion and deadlock-like issues, as local work items are stolen with the lowest priority by other threads. In a situation where all worker threads are blocked on tasks and new ones continue to block on tasks similarly, the global queues may not deplete for a long time and any local work items of blocked threads may not run meanwhile. There have been some reports of issues like this occurring while coinciding with other external issues that aggravate the problem. - When a worker thread blocks on a task, the change moves any local work items to the high-priority global queue. Using the normal-priority queues can lead to other priority inversion issues in worst-case scenarios like above, where the normal-priority queues may consist of a number of new requests, and local work items typically represent already in-flight work.
- Loading branch information
Showing
2 changed files
with
46 additions
and
25 deletions.
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