Replace the session lock with two locks, a "forward" lock and
a "backwards" lock named frwd_lock and back_lock respectively.

The forward lock protects resources that change while sending a 
request to the target, such as cmdsn, queued_cmdsn, and allocating 
task from the commands' pool with kfifo_out.

The backward lock protects resources that change while processing 
a response or in error path, such as cmdsn_exp, cmdsn_max, and 
returning tasks to the commands' pool with kfifo_in. 

Under a "steady state" fast-path situation, that is when one 
or more processes/threads submit IO to an iscsi device and 
a single kernel upcall (e.g softirq) is dealing with processing 
of responses without errors, this patch eliminates the contention
between the queuecommand()/request response/scsi_done() associated
with iscsi sessions.

Using these patches in an accelerated version of the iser initiator we were
able to gain large improvements in IOPS rate in a situation where the burning
bottle-neck was the session lock.

The first patch in the series is a restructuring patch for iscsi_tcp_r2t_rsp
routine in order to avoid allocating r2t from r2tpool.queue and returning it
back in case the parameters rhdr->data_length and or rhdr->data_offset prohibit
the requeuing.

The third patch that removes unneded code as pointed by Mike Christie.

changes from V1:

The previous patch 
"0003-SCSI-libisci_tcp-Add-locking-to-protect-r2t-queues.patch"
Which was a a fix of a problem pointed out by Mike Christie, that is 
iscsi_tcp_r2t_rsp
is called under backwards lock and it does insertion into a list for which the
deletion is done under the forward lock, was auashed into the second patch since
without it the second patach is not correct.

Add a patch that removes unneded code as pointed by Mike Christie.

Fix comments in code that erroneously reffered to the deprecated session lock.

Add a section in "Reduce locking contention in fast path" patch that descibes 
the
locking hierarchy between the forward and the backward locks.

Shlomo Pongratz (3):

  SCSI/libiscsi: restructure iscsi_tcp_r2t_rsp
  SCSI/libiscsi: Reduce locking contention in fast path
  ICSI/libiscsi: remove unneeded code

 drivers/scsi/be2iscsi/be_main.c  |   26 ++--
 drivers/scsi/bnx2i/bnx2i_hwi.c   |   46 ++++----
 drivers/scsi/bnx2i/bnx2i_iscsi.c |    8 +-
 drivers/scsi/iscsi_tcp.c         |   22 ++--
 drivers/scsi/libiscsi.c          |  226 ++++++++++++++++++++------------------
 drivers/scsi/libiscsi_tcp.c      |   70 +++++++-----
 drivers/scsi/qla4xxx/ql4_isr.c   |    4 +-
 include/scsi/libiscsi.h          |    9 +-
 include/scsi/libiscsi_tcp.h      |    2 +
 9 files changed, 222 insertions(+), 191 deletions(-)

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to