- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi all, the following words is from Andrey Marochko 's blog:
"It is also important to realize, that there will always be some timeout between the moment the market updates worker quotas, and the moment when workers actually migrate between arenas. This happens because a worker can discover that it needs to leave its current arena in order to join another one only when it is both in its stealing loop (that is does not have tasks in its local task pool) and does not execute a nested parallel algorithm. Thus re-establishing fairness of worker threads distribution may take a noticeable time in some cases."
Obviously, "updates worker quotas" and "workers actually migrate between arenas" are different things; in the source code, I found that "updates worker quotas" was done by function "update_allotment", which was maily called by ‘is_out_of_work’ and ‘advertise_new_work’. But I don't find the place where "workers actually migrate between arenas" in the source code, so how did that happen?
BR,
Xiaoqiang
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
At first sight, receive_or_steal_task() will exit with NULL, then local_wait_for_all() exits, then arena::process(), and then market::process() finds a new arena where the thread can do useful work. But don't hold me to that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Raf Schietekat wrote:
At first sight, receive_or_steal_task() will exit with NULL, then local_wait_for_all() exits, then arena::process(), and then market::process() finds a new arena where the thread can do useful work. But don't hold me to that.
Thanks Raf, yes, you are right. I found a while-loop in market::process to switch arenas.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page