1. 26 4月, 2019 6 次提交
  2. 12 4月, 2019 1 次提交
  3. 13 2月, 2019 2 次提交
  4. 09 1月, 2019 2 次提交
  5. 03 1月, 2019 12 次提交
  6. 04 10月, 2018 2 次提交
  7. 03 10月, 2018 10 次提交
  8. 09 8月, 2018 1 次提交
    • C
      xprtrdma: Fix disconnect regression · 8d4fb8ff
      Chuck Lever 提交于
      I found that injecting disconnects with v4.18-rc resulted in
      random failures of the multi-threaded git regression test.
      
      The root cause appears to be that, after a reconnect, the
      RPC/RDMA transport is waking pending RPCs before the transport has
      posted enough Receive buffers to receive the Replies. If a Reply
      arrives before enough Receive buffers are posted, the connection
      is dropped. A few connection drops happen in quick succession as
      the client and server struggle to regain credit synchronization.
      
      This regression was introduced with commit 7c8d9e7c ("xprtrdma:
      Move Receive posting to Receive handler"). The client is supposed to
      post a single Receive when a connection is established because
      it's not supposed to send more than one RPC Call before it gets
      a fresh credit grant in the first RPC Reply [RFC 8166, Section
      3.3.3].
      
      Unfortunately there appears to be a longstanding bug in the Linux
      client's credit accounting mechanism. On connect, it simply dumps
      all pending RPC Calls onto the new connection. It's possible it has
      done this ever since the RPC/RDMA transport was added to the kernel
      ten years ago.
      
      Servers have so far been tolerant of this bad behavior. Currently no
      server implementation ever changes its credit grant over reconnects,
      and servers always repost enough Receives before connections are
      fully established.
      
      The Linux client implementation used to post a Receive before each
      of these Calls. This has covered up the flooding send behavior.
      
      I could try to correct this old bug so that the client sends exactly
      one RPC Call and waits for a Reply. Since we are so close to the
      next merge window, I'm going to instead provide a simple patch to
      post enough Receives before a reconnect completes (based on the
      number of credits granted to the previous connection).
      
      The spurious disconnects will be gone, but the client will still
      send multiple RPC Calls immediately after a reconnect.
      
      Addressing the latter problem will wait for a merge window because
      a) I expect it to be a large change requiring lots of testing, and
      b) obviously the Linux client has interoperated successfully since
      day zero while still being broken.
      
      Fixes: 7c8d9e7c ("xprtrdma: Move Receive posting to ... ")
      Cc: stable@vger.kernel.org # v4.18+
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      8d4fb8ff
  9. 31 7月, 2018 1 次提交
    • B
      RDMA, core and ULPs: Declare ib_post_send() and ib_post_recv() arguments const · d34ac5cd
      Bart Van Assche 提交于
      Since neither ib_post_send() nor ib_post_recv() modify the data structure
      their second argument points at, declare that argument const. This change
      makes it necessary to declare the 'bad_wr' argument const too and also to
      modify all ULPs that call ib_post_send(), ib_post_recv() or
      ib_post_srq_recv(). This patch does not change any functionality but makes
      it possible for the compiler to verify whether the
      ib_post_(send|recv|srq_recv) really do not modify the posted work request.
      
      To make this possible, only one cast had to be introduce that casts away
      constness, namely in rpcrdma_post_recvs(). The only way I can think of to
      avoid that cast is to introduce an additional loop in that function or to
      change the data type of bad_wr from struct ib_recv_wr ** into int
      (an index that refers to an element in the work request list). However,
      both approaches would require even more extensive changes than this
      patch.
      Signed-off-by: NBart Van Assche <bart.vanassche@wdc.com>
      Reviewed-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      d34ac5cd
  10. 19 6月, 2018 1 次提交
  11. 02 6月, 2018 1 次提交
    • C
      xprtrdma: Wait on empty sendctx queue · 2fad6592
      Chuck Lever 提交于
      Currently, when the sendctx queue is exhausted during marshaling, the
      RPC/RDMA transport places the RPC task on the delayq, which forces a
      wait for HZ >> 2 before the marshal and send is retried.
      
      With this change, the transport now places such an RPC task on the
      pending queue, and wakes it just as soon as more sendctxs become
      available. This typically takes less than a millisecond, and the
      write_space waking mechanism is less deadlock-prone.
      
      Moreover, the waiting RPC task is holding the transport's write
      lock, which blocks the transport from sending RPCs. Therefore faster
      recovery from sendctx queue exhaustion is desirable.
      
      Cf. commit 5804891455d5 ("xprtrdma: ->send_request returns -EAGAIN
      when there are no free MRs").
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      2fad6592
  12. 12 5月, 2018 1 次提交