[Gluster-devel] zero-copy readv

Bharata B Rao bharata.rao at gmail.com
Mon Jan 21 04:16:41 UTC 2013


On Thu, Jan 10, 2013 at 11:55 AM, Anand Avati <aavati at redhat.com> wrote:
> - On the read side things are a little more complicated. In
> rpc-transport/socket, there is a call to iobuf_get() to create a new iobuf
> for reading in the readv reply data from the server. We will need a
> framework changes where, if the readv request (of the xid for which readv
> reply is being handled) happened to be a "direct" variant (i.e, zero-copy),
> then the "special iobuf around user's memory" gets picked up and read() from
> socket is performed directly into user's memory. Similar, but equivalent,

AFAICS, the read from the socket is always done to a single buffer and
the actual "scatter input" (reading or copying into multiple user supplied
iovec buffer) is actually done at the end in libgfapi. So as you note, some
framework changes need to be done to enable direct reading of socket data into
multiple user supplied buffers.

Regards,
Bharata.
-- 
http://raobharata.wordpress.com/




More information about the Gluster-devel mailing list