[Stgt-devel] [PATCH 08/20] iser virtualize malloc
Pete Wyckoff
pw
Fri Dec 7 21:21:43 CET 2007
tomof at acm.org wrote on Mon, 12 Nov 2007 23:14 +0900:
> On Tue, 16 Oct 2007 11:20:21 -0400
> Pete Wyckoff <pw at osc.edu> wrote:
>
> > Virtualize malloc and free when dealing with memory that the
> > transport will use. It must be per-connection for RDMA.
>
> I modified and merged this.
>
> As I said, we need aligned buffer for data transfer so I added
> alloc/free_data_buf to iscsi_transport.
This works well. Haven't looked at the timings yet, though.
> If you need pre-registered buffer for iscsi_task too (for sense, I
> guess), you can add alloc/free_task to iscsi_transport. But I think
> that you don't need to use pre-registered buffer for sense and you can
> register sense buffer when you need it.
Sense goes in response message, so is memcpy-ed to pre-registered
small packet areas. Only DATA_IN gets converted to RDMA write
and R2T to RDMA read. Everything else goes through a memcpy
currently.
Perhaps there is an optimization to avoid the copies, but it would
require managing conn->rx_buffer and tx_buffer and sense in a way
that is a bit invasive to core iscsid.c. I'm not going to try it.
-- Pete
More information about the stgt
mailing list