1. 22 6月, 2013 2 次提交
  2. 15 2月, 2013 1 次提交
    • M
      IB/qib: Fix QP locate/remove race · bcc9b67a
      Mike Marciniszyn 提交于
      remove_qp() can execute concurrently with a qib_lookup_qpn() on
      another CPU, which in of itself, is ok, given the RCU locking.
      
      The issue is that remove_qp() NULLs out the qp->next field so that a
      qib_lookup_qpn() might fail to find a qp if it occurs after the one
      that is being deleted.  This is a momentary issue and subsequent
      qib_lookup_qpn() calls would find the qp's since the search restarts
      from the bucket head.  At scale, the issue might causes dropped
      packets and unnecessary retransmissions.
      
      The fix just deletes the qp->next NULL assignment to prevent the
      remove_qp() from hiding qp's from qib_lookup_qpn().
      Reviewed-by: NDean Luick <dean.luick@intel.com>
      Signed-off-by: NMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      bcc9b67a
  3. 06 2月, 2013 1 次提交
  4. 18 7月, 2012 1 次提交
  5. 09 7月, 2012 1 次提交
    • M
      IB/qib: Avoid returning EBUSY from MR deregister · 6a82649f
      Mike Marciniszyn 提交于
      A timing issue can occur where qib_mr_dereg can return -EBUSY if the
      MR use count is not zero.
      
      This can occur if the MR is de-registered while RDMA read response
      packets are being progressed from the SDMA ring.  The suspicion is
      that the peer sent an RDMA read request, which has already been copied
      across to the peer.  The peer sees the completion of his request and
      then communicates to the responder that the MR is not needed any
      longer.  The responder tries to de-register the MR, catching some
      responses remaining in the SDMA ring holding the MR use count.
      
      The code now uses a get/put paradigm to track MR use counts and
      coordinates with the MR de-registration process using a completion
      when the count has reached zero.  A timeout on the delay is in place
      to catch other EBUSY issues.
      
      The reference count protocol is as follows:
      - The return to the user counts as 1
      - A reference from the lk_table or the qib_ibdev counts as 1.
      - Transient I/O operations increase/decrease as necessary
      
      A lot of code duplication has been folded into the new routines
      init_qib_mregion() and deinit_qib_mregion().  Additionally, explicit
      initialization of fields to zero is now handled by kzalloc().
      
      Also, duplicated code 'while.*num_sge' that decrements reference
      counts have been consolidated in qib_put_ss().
      Reviewed-by: NRamkrishna Vepa <ramkrishna.vepa@intel.com>
      Signed-off-by: NMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      6a82649f
  6. 15 5月, 2012 1 次提交
  7. 22 10月, 2011 3 次提交
  8. 11 1月, 2011 3 次提交
  9. 04 8月, 2010 1 次提交
  10. 24 5月, 2010 1 次提交