tag:blogger.com,1999:blog-5246987755651065286.post5595958967324891130..comments2024-02-22T16:15:42.388-08:00Comments on cbloom rants: 04-04-13 - Worker Thread Forward Permit Delay-Kickscbloomhttp://www.blogger.com/profile/10714564834899413045noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-5246987755651065286.post-84845014199647197412013-04-05T15:51:27.807-07:002013-04-05T15:51:27.807-07:00Well, if the other workers are awake then I don...Well, if the other workers are awake then I don't care if they steal my work or not. And yeah I agree trying to guarantee that you get a work item for yourself in that situation is a mistake; it's just pointless work and actually the race is a performance benefit.<br /><br />However, if the other workers are asleep and the question is "should I wake them up?" then it's a whole other ballgame, and it is worth quite a lot to put some care into not waking them when it won't help.<br />cbloomhttps://www.blogger.com/profile/10714564834899413045noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-17870454897456556522013-04-05T01:56:17.273-07:002013-04-05T01:56:17.273-07:00I have a similar system with forward dependencies ...I have a similar system with forward dependencies as well, and I used to have a solution like that where the worker would keep a one item queue of the next job and only kick other workers if it enqueued more than one.<br /><br />I killed that off though, since it kind of works out anyway because the dependent jobs are all pushed onto a local queue which is LIFO for pop and FIFO for steal. In general the worker that does the completion and pushes the dependent jobs will just win the race to the local queue over the stealers since popping from the local queue is a tight loop. If the worker is preempted some other worker might steal the job which is generally a good thing.danielwhttps://www.blogger.com/profile/14632151984930016897noreply@blogger.com