freebsd-dev/sys/dev/iscsi
Alexander Motin 9a4510ac32 Implement zero-copy iSCSI target transmission/read.
Add ICL_NOCOPY flag to icl_pdu_append_data(), specifying that the method
can just reference the data buffer instead of immediately copying it.

Extend the offload KPI with optional PDU queue method, allowing to specify
completion callback, called when all the data referenced by above has been
transferred and won't be accessed any more (the buffers can be freed).

Implement the above functionality in software iSCSI driver using mbufs
with external storage and reference counter.  Note that some NICs (ixl(4))
may keep the mbuf in TX queue for a long time, so CTL has to be ready.

Add optional method to struct ctl_scsiio for buffer reference counting.
Implement it for CTL block backend, allowing to delay free of the struct
ctl_be_block_io and memory it references as needed.  In first reincarnation
of the patch I tried to delay whole I/O as it is done for FibreChannel,
that was cleaner, but due to the above callback delays I had to rewrite
it this way to not leave LUN referenced potentially for hours or more.

All together on sequential read from ZFS ARC this saves about 30% of CPU
time and memory bandwidth by avoiding one of 3 memory copies (the other
two are from ZFS ARC to DMU cache and then from DMU cache to CTL buffers).
On tests with 2x Xeon Silver 4114 this allows to reach full line rate of
100GigE NIC.  Tests with Gold CPUs and two 100GigE NICs are stil TBD,
but expectations to saturate them are pretty high. ;)

Discussed with:	Chelsio
Sponsored by:	iXsystems, Inc.
2020-06-08 20:53:57 +00:00
..
icl_conn_if.m Implement zero-copy iSCSI target transmission/read. 2020-06-08 20:53:57 +00:00
icl_soft_proxy.c
icl_soft.c Implement zero-copy iSCSI target transmission/read. 2020-06-08 20:53:57 +00:00
icl_wrappers.h Implement zero-copy iSCSI target transmission/read. 2020-06-08 20:53:57 +00:00
icl.c
icl.h Implement zero-copy iSCSI target transmission/read. 2020-06-08 20:53:57 +00:00
iscsi_ioctl.h
iscsi_proto.h
iscsi.c
iscsi.h