[Stgt-devel] iSER patches, second release
Thu Sep 6 14:22:08 CEST 2007
I have a few questions regarding the code. I'll post them in different mails.
In handle_wc() in case of IBV_WC_RECV, iscsi_rx_handler() gets called and
the received pdu is passed as an implicit parameter, through
Only then it gets reposted.
First, the parameter passing method somewhat bothers me because it seems
that on a SMP system two RECV completions may arrive through different
CPUs and then we end up with garbage in ci->rcv_comm_event.
Do I miss anything on this? Are all completions handled by the same CPU?
Is there an implicit guard somewhere?
Second, it looks like iscsi_rx_handler() will eventually copy the pdu data.
Even if set to a small value, if the traffic consists only of such small writes
it will be copied entirely.
Third, reposting is postponed until iscsi handles the rx event.
a. to add the rx descriptor to a list and have iscsi_rx_handler() to feed upon
this list which may be guarded if necessary
b. to repost a different rx buffer - so it gets reposted as soon as possible -
c. not to copy the current one - but instead use it by reference all
the way down
the target, just as you do with the rdma buffers.
This may increase the number of resources to allocate but this may improve
the performance, at least in some cases.
More information about the stgt