[Gluster-devel] Is it safe to use synctask_{wake, yield} outside of __wake and __yield macros?

Anand Avati anand.avati at gmail.com
Wed Feb 13 23:53:49 UTC 2013

So you are not using the SYNCOP() macro, right? Can you show a code snippet
of how you are trying to fan-out and yield? We could probably come up with
a generic framework for such fan-out->yield->wake pattern.

You should be able to call syncop_yield() instead of __yield() if you are
_sure_ that the caller is going to be from within a syncenv.


On Wed, Feb 13, 2013 at 11:29 AM, Krishnan Parthasarathi <
kparthas at redhat.com> wrote:

> In glusterd, I am trying to perform a series of syncops in a batch. ie,
> yield the thread
> once all the non-blocking operations are queued. The wakeup back to the
> yielded thread
> happens as part of the call_cnt mechanism in the callback(s).
> Given this, I wanted to know if I would be flouting any of assumptions, if
> I used
> synctask_yield and synctask_wake as opposed to their macro counterparts.
> More specifically,
> is there a chance that synctask_get() would return NULL on a thread which
> is part of a syncenv's
> thread pool?
> thanks,
> krish
> _______________________________________________
> Gluster-devel mailing list
> Gluster-devel at nongnu.org
> https://lists.nongnu.org/mailman/listinfo/gluster-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20130213/b4ad0b58/attachment-0001.html>

More information about the Gluster-devel mailing list