Blocking workers in the task area #1353
dnmokhov
started this conversation in
Design discussions
Replies: 1 comment
-
#1352 is a proposed implementation of option 1 above that blocks for 1ms on non-hybrid CPUs. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem
We have observed performance degradation with some workloads on large systems when CPU power state auto-demotion is disabled.
With deeper C-states, thread wake up time increases. This could result in a vicious cycle of worker threads arriving too late into a task arena and leaving again due to no work.
Since enabling the auto-demotion is not always an option (e.g., due to lack of administrative privileges), we need to implement a solution to prevent this behavior, while still allowing eventual sleeping for power efficiency.
Proposal
Make worker threads wait for a certain time ("block time") before leaving the arena when no work is available. If more work becomes available in the arena, the workers should unblock and stay. Also, if other arenas are requesting workers, the worker should unblock and leave the current arena immediately.
Options
task_arena
API that will to enable blocking when new work is to be submitted soon.KMP_BLOCKTIME
-like solution via a newglobal_control
ortask_arena
API.Beta Was this translation helpful? Give feedback.
All reactions