forked from scylladb/seastar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reactor: convert task quota signal to a timerfd+thread
In Linux, signals are protected by a global lock, and thus don't scale with increasing core counts. We already observed this on large machines, and it will grow worse with our plans for sub-task-quota timing with the CPU scheduler. To prevent a lock meltdown, convert the signal to a timerfd + a thread to wait for it and update g_need_preempt. We pay the cost of a context switch, but that is not very different from signal delivery, (perhaps even cheaper), and scales with increasing core counts. In the future we may want to have timer threads service g_need_preempt for other reactors on the same processor socket, if it proves necessary.
- Loading branch information
Showing
2 changed files
with
25 additions
and
21 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