1. 26 7月, 2014 2 次提交
  2. 19 3月, 2014 1 次提交
  3. 16 3月, 2014 1 次提交
    • S
      [SCSI] libiscsi: Reduce locking contention in fast path · 659743b0
      Shlomo Pongratz 提交于
      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() flows
      associated with iscsi sessions.
      
      Between the forward and the backward locks exists a strict locking
      hierarchy. The mutual exclusion zone protected by the forward lock can
      enclose the mutual exclusion zone protected by the backward lock but not
      vice versa.
      
      For example, in iscsi_conn_teardown or in iscsi_xmit_data when there is
      a failure and __iscsi_put_task is called, the backward lock is taken while
      the forward lock is still taken. On the other hand, if in the RX path a nop
      is to be sent, for example in iscsi_handle_reject or __iscsi_complete_pdu
      than the forward lock is released and the backward lock is taken for the
      duration of iscsi_send_nopout, later the backward lock is released and the
      forward lock is retaken.
      
      libiscsi_tcp uses two kernel fifos the r2t pool and the r2t queue.
      
      The insertion and deletion from these queues didn't corespond to the
      assumption taken by the new forward/backwards session locking paradigm.
      
      That is, in iscsi_tcp_clenup_task which belongs to the RX (backwards)
      path, r2t is taken out from r2t queue and inserted to the r2t pool.
      In iscsi_tcp_get_curr_r2t which belong to the TX (forward) path, r2t
      is also inserted to the r2t pool and another r2t is pulled from r2t
      queue.
      
      Only in iscsi_tcp_r2t_rsp which is called in the RX path but can requeue
      to the TX path, r2t is taken from the r2t pool and inserted to the r2t
      queue.
      
      In order to cope with this situation, two spin locks were added,
      pool2queue and queue2pool. The former protects extracting from the
      r2t pool and inserting to the r2t queue, and the later protects the
      extracing from the r2t queue and inserting to the r2t pool.
      Signed-off-by: NShlomo Pongratz <shlomop@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      [minor fix up to apply cleanly and compile fix]
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      659743b0
  4. 14 10月, 2013 1 次提交
  5. 24 8月, 2013 1 次提交
  6. 27 11月, 2012 1 次提交
  7. 08 7月, 2012 1 次提交
  8. 27 6月, 2012 1 次提交
  9. 10 5月, 2012 2 次提交
  10. 04 1月, 2012 1 次提交
  11. 27 8月, 2011 3 次提交
  12. 25 7月, 2011 1 次提交
    • N
      iscsi: Resolve iscsi_proto.h naming conflicts with drivers/target/iscsi · 12352183
      Nicholas Bellinger 提交于
      This patch renames the following iscsi_proto.h structures to avoid
      namespace issues with drivers/target/iscsi/iscsi_target_core.h:
      
      *) struct iscsi_cmd -> struct iscsi_scsi_req
      *) struct iscsi_cmd_rsp -> struct iscsi_scsi_rsp
      *) struct iscsi_login -> struct iscsi_login_req
      
      This patch includes useful ISCSI_FLAG_LOGIN_[CURRENT,NEXT]_STAGE*,
      and ISCSI_FLAG_SNACK_TYPE_* definitions used by iscsi_target_mod, and
      fixes the incorrect definition of struct iscsi_snack to following
      RFC-3720 Section 10.16. SNACK Request.
      
      Also, this patch updates libiscsi, iSER, be2iscsi, and bn2xi to
      use the updated structure definitions in a handful of locations.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      12352183
  13. 30 6月, 2011 2 次提交
  14. 25 5月, 2011 3 次提交
  15. 25 2月, 2011 3 次提交
  16. 22 12月, 2010 9 次提交
  17. 06 9月, 2010 3 次提交
  18. 28 7月, 2010 4 次提交