[Gluster-devel] How does GD_SYNCOP work?
Krishnan Parthasarathi
kparthas at redhat.com
Thu Sep 11 04:41:54 UTC 2014
Emmanuel,
The scheduling of a paused task happens when the epoll thread receives a POLLIN event along with
the response from the remote endpoint. This is contingent on the fact that the call back must issue
a synctask_wake, which will trigger the resumption of the task (in one of the threads from the syncenv).
In summary, the call back code triggers the scheduling back of the paused task.
HTH,
KP
----- Original Message -----
> On Wed, Sep 10, 2014 at 05:32:41AM -0400, Krishnan Parthasarathi wrote:
> > Let me try to explain how GD_SYNCOP works. Internally, GD_SYNCOP yields the
> > thread that was
> > executing the (sync)task once the RPC request is submitted (asynchronously)
> > to the remote endpoint.
> > It's equivalent to pausing the task until the response is received. The
> > call back function, which generally
> > executes in the epoll thread, wakes the corresponding task into execution
> > (ie. resumes task execution).
>
> I suspect this is the problem: the task is not scheduled. NetBSD uses poll
> and not epoll,
> which may explain the problem. Where does the task scheduling happens in
> epoll code?
> --
> Emmanuel Dreyfus
> manu at netbsd.org
>
More information about the Gluster-devel
mailing list