1. 12 11月, 2014 2 次提交
  2. 21 5月, 2014 3 次提交
    • B
      IB/srp: Add fast registration support · 5cfb1782
      Bart Van Assche 提交于
      Certain HCA types (e.g. Connect-IB) and certain configurations (e.g.
      ConnectX VF) support fast registration but not FMR. Hence add fast
      registration support.
      
      In function srp_rport_reconnect(), move the the srp_finish_req()
      loop from after to before the srp_create_target_ib() call. This is
      needed to avoid that srp_finish_req() tries to queue any
      invalidation requests for rkeys associated with the old queue pair
      on the newly allocated queue pair. Invoking srp_finish_req() before
      the queue pair has been reallocated is safe since srp_claim_req()
      handles completions correctly that arrive after srp_finish_req()
      has been invoked.
      Signed-off-by: NBart Van Assche <bvanassche@acm.org>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      5cfb1782
    • B
      IB/srp: Rename FMR-related variables · 52ede08f
      Bart Van Assche 提交于
      The next patch will cause the renamed variables to be shared between
      the code for FMR and for FR memory registration. Make the names of
      these variables independent of the memory registration mode. This
      patch does not change any functionality. The start of this patch was
      the changes applied via the following shell command:
      
      sed -i.orig 's/SRP_FMR_SIZE/SRP_MAX_PAGES_PER_MR/g; \
          s/fmr_page_mask/mr_page_mask/g;s/fmr_page_size/mr_page_size/g; \
          s/fmr_page_shift/mr_page_shift/g;s/fmr_max_size/mr_max_size/g; \
          s/max_pages_per_fmr/max_pages_per_mr/g;s/nfmr/nmdesc/g; \
          s/fmr_len/dma_len/g' drivers/infiniband/ulp/srp/ib_srp.[ch]
      Signed-off-by: NBart Van Assche <bvanassche@acm.org>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      52ede08f
    • B
      IB/srp: One FMR pool per SRP connection · d1b4289e
      Bart Van Assche 提交于
      Allocate one FMR pool per SRP connection instead of one SRP pool
      per HCA. This improves scalability of the SRP initiator.
      
      Only request the SCSI mid-layer to retry a SCSI command after a
      temporary mapping failure (-ENOMEM) but not after a permanent
      mapping failure. This avoids that SCSI commands are retried
      indefinitely if a permanent memory mapping failure occurs.
      
      Tell the SCSI mid-layer to reduce queue depth temporarily in the
      unlikely case where an application is queuing many requests with
      more than max_pages_per_fmr sg-list elements.
      
      For FMR pool allocation, base the max_pages_per_fmr parameter on
      the HCA memory registration limit. Only try to allocate an FMR
      pool if FMR is supported.
      Signed-off-by: NBart Van Assche <bvanassche@acm.org>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      d1b4289e
  3. 25 3月, 2014 1 次提交
  4. 09 11月, 2013 5 次提交
  5. 02 7月, 2013 1 次提交
  6. 26 2月, 2013 1 次提交
    • B
      IB/srp: Fail I/O requests if the transport is offline · 2ce19e72
      Bart Van Assche 提交于
      If an SRP target is no longer reachable and srp_reset_host() fails to
      reconnect then ib_srp will invoke scsi_remove_host().  That function
      will invoke __scsi_remove_device() for each LUN.  And that last
      function will change the device state from SDEV_TRANSPORT_OFFLINE into
      SDEV_CANCEL.  Certain user space software, e.g. older versions of
      multipathd, continue queueing I/O to SCSI devices that are in the
      SDEV_CANCEL state.
      
      If these I/O requests are submitted as SG_IO that means that the
      REQ_PREEMPT flag will be set and hence that these requests will be
      passed to srp_queuecommand().  These requests will time out.  If new
      requests are queued fast enough from user space these active requests
      will prevent __scsi_remove_device() to finish.
      
      Avoid this by failing I/O requests in the SDEV_CANCEL state if the
      transport is offline.  Introduce a new variable to keep track of the
      transport state instead of failing requests if (!target->connected ||
      target->qp_in_error), so that the SCSI error handler has a chance to
      retry commands after a transport layer failure occurred.
      Signed-off-by: NBart Van Assche <bvanassche@acm.org>
      Cc: <stable@vger.kernel.org> # 3.8
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      2ce19e72
  7. 01 12月, 2012 5 次提交
  8. 16 3月, 2011 4 次提交
    • D
      IB/srp: try to use larger FMR sizes to cover our mappings · be8b9814
      David Dillow 提交于
      Now that we can get larger SG lists, we can take advantage of HCAs that
      allow us to use larger FMR sizes. In many cases, we can use up to 512
      entries, so start there and work our way down.
      Signed-off-by: NDavid Dillow <dillowda@ornl.gov>
      be8b9814
    • D
      IB/srp: add support for indirect tables that don't fit in SRP_CMD · c07d424d
      David Dillow 提交于
      This allows us to guarantee the ability to submit up to 8 MB requests
      based on the current value of SCSI_MAX_SG_CHAIN_SEGMENTS. While FMR will
      usually condense the requests into 8 SG entries, it is imperative that
      the target support external tables in case the FMR mapping fails or is
      not supported.
      
      We add a safety valve to allow targets without the needed support to
      reap the benefits of the large tables, but fail in a manner that lets
      the user know that the data didn't make it to the device. The user must
      add "allow_ext_sg=1" to the target parameters to indicate that the
      target has the needed support.
      
      If indirect_sg_entries is not specified in the modules options, then
      the sg_tablesize for the target will default to cmd_sg_entries unless
      overridden by the target options.
      Signed-off-by: NDavid Dillow <dillowda@ornl.gov>
      c07d424d
    • D
      IB/srp: rework mapping engine to use multiple FMR entries · 8f26c9ff
      David Dillow 提交于
      Instead of forcing all of the S/G entries to fit in one FMR, and falling
      back to indirect descriptors if that fails, allow the use of as many
      FMRs as needed to map the request. This lays the groundwork for allowing
      indirect descriptor tables that are larger than can fit in the command
      IU, but should marginally improve performance now by reducing the number
      of indirect descriptors needed.
      
      We increase the minimum page size for the FMR pool to 4K, as larger
      pages help increase the coverage of each FMR, and it is rare that the
      kernel would send down a request with scattered 512 byte fragments.
      
      This patch also move some of the target initialization code afte the
      parsing of options, to keep it together with the new code that needs to
      allocate memory based on the options given.
      Signed-off-by: NDavid Dillow <dillowda@ornl.gov>
      8f26c9ff
    • D
      IB/srp: allow sg_tablesize to be set for each target · 49248644
      David Dillow 提交于
      Different configurations of target software allow differing max sizes of
      the command IU. Allowing this to be changed per-target allows all
      targets on an initiator to get an optimal setting.
      
      We deprecate srp_sg_tablesize and replace it with cmd_sg_entries in
      preparation for allowing more indirect descriptors than can fit in the
      IU.
      Signed-off-by: NDavid Dillow <dillowda@ornl.gov>
      49248644
  9. 11 1月, 2011 4 次提交
  10. 06 1月, 2011 2 次提交
  11. 23 10月, 2010 2 次提交
  12. 02 3月, 2010 1 次提交
  13. 15 7月, 2008 1 次提交
  14. 20 4月, 2008 2 次提交
  15. 05 2月, 2008 1 次提交
    • D
      IB/srp: Retry stale connections · 9fe4bcf4
      David Dillow 提交于
      When a host just goes away (crash, power loss, etc.) without tearing
      down its IB connections, it can get stale connection errors when it
      tries to reconnect to targets upon rebooting.  Retrying the connection
      a few times will prevent sysadmins from playing the "which disk(s)
      went missing?" game.
      
      This would have made things slightly quicker when tracking down some
      of the recent bugs, but it also helps quite a bit when you've got a
      large number of targets hanging off a wedged server.
      Signed-off-by: NDavid Dillow <dillowda@ornl.gov>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      9fe4bcf4
  16. 26 1月, 2008 1 次提交
    • D
      IB/srp: Respect target credit limit · 8cba2077
      David Dillow 提交于
      The current SRP initiator will send requests even if it has no credits
      available.  The results of sending extra requests are vendor specific,
      but on some devices, overrunning credits will cost 85% of peak
      performance -- e.g. 100 MB/s vs 720 MB/s.  Other devices may just drop
      the requests.
      
      This patch will tell the SCSI midlayer to queue requests if there are
      fewer than two credits remaining, and will not issue a task management
      request if there are no credits remaining.  The mid-layer will retry
      the queued command once an outstanding command completes.
      
      The patch also removes the unlikely() in __srp_get_tx_iu(), as it is
      not at all unlikely to hit this limit under heavy load.
      Signed-off-by: NDavid Dillow <dillowda@ornl.gov>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      8cba2077
  17. 07 6月, 2007 1 次提交
  18. 07 5月, 2007 1 次提交
  19. 05 2月, 2007 1 次提交
    • I
      IB/srp: Don't wait for response when QP is in error state. · 1033ff67
      Ishai Rabinovitz 提交于
      When there is a call to send_tsk_mgmt SRP posts a send and waits for 5
      seconds to get a response.
      
      When the QP is in the error state it is obvious that there will be no
      response so it is quite useless to wait.  In fact, the timeout causes
      SRP to wait a long time to reconnect when a QP error occurs. (Each
      abort and each reset_device calls send_tsk_mgmt, which waits for the
      timeout).  The following patch solves this problem by identifying the
      failure and returning an immediate error code.
      Signed-off-by: NIshai Rabinovitz <ishai@mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      1033ff67
  20. 16 12月, 2006 1 次提交
    • R
      IB/srp: Fix FMR mapping for 32-bit kernels and addresses above 4G · bf628dc2
      Roland Dreier 提交于
      struct srp_device.fmr_page_mask was unsigned long, which means that
      the top part of addresses above 4G was being chopped off on 32-bit
      architectures.  Of course nothing good happens when data from SRP
      targets is DMAed to the wrong place.
      
      Fix this by changing fmr_page_mask to u64, to match the addresses
      actually used by IB devices.
      
      Thanks to Brian Cain <Brian.Cain@ge.com> and David McMillen
      <davem@systemfabricworks.com> for help diagnosing the bug and testing
      the fix.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      bf628dc2