Googles appar
Huvudmeny

Post a Comment On: cbloom rants

"04-04-13 - Worker Thread Forward Permit Delay-Kicks"

2 Comments -

1 – 2 of 2
Blogger danielw said...

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.

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.

April 5, 2013 at 1:56 AM

Blogger cbloom said...

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.

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.

April 5, 2013 at 3:51 PM

You can use some HTML tags, such as <b>, <i>, <a>

This blog does not allow anonymous comments.

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.