On Wed, Aug 10, 2016 at 9:43 PM, Wink Saville <[email protected]> wrote:
> I don't see any bugs either, although it took me several days to
> get my the version that stalls working. In fact I got it working by first
> changing my test code so I could use rmv_non_stalling() everywhere.


Hi Wink,

Well, non-blocking algorithms are hard. A proof for the original
algorithm won't help you with your new version.


> And then got the idea to call  rmv_non_stalling() from my
> stall routine and low and behold rmv() started working. I then looked
> at the debug traces and figured out the real problem, I wasn't actually
> removing the node when after stalling.
>
> In my current version of rmv() I changed the code paths so there
> is one stall point and I remove the node at the end:
>
> mpscq_node_t* rmv(mpscq_t* self)
> {
>   mpscq_node_t* tail = self->tail;
>   mpscq_node_t* next = tail->next;
>   if (tail == &self->stub)
>   {
>     if (0 == next)
>       return 0;
>     self->tail = next;
>     tail = next;
>     next = next->next;
>   }
>
>   if (0 == next)
>   {
>     if (tail == self->head)
>       mpscq_push(self, &self->stub);
>
>     next = tail->next;
>     while (0 == next)
>     {
>       sched_yield();
>       next = tail->next;
>     }
>   }
>
>   self->tail = next;
>   return tail;
> }
>
>
> Anyway, I'll look into RRD and SPIN in the future, thanks for the tip.
>
> Actually, what does "Relacy" mean?


It stands for RELAxed ConsistencY.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Scalable Synchronization Algorithms" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/lock-free/CAEeQi3vL6FpBrf0dnxBT64efM7hUbu7L5qG7w%2B5611a97k6uhg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to