1. 24 10月, 2019 6 次提交
  2. 27 8月, 2019 1 次提交
  3. 21 8月, 2019 7 次提交
  4. 20 8月, 2019 2 次提交
    • C
      xprtrdma: Boost maximum transport header size · f3c66a2f
      Chuck Lever 提交于
      Although I haven't seen any performance results that justify it,
      I've received several complaints that NFS/RDMA no longer supports
      a maximum rsize and wsize of 1MB. These days it is somewhat smaller.
      
      To simplify the logic that determines whether a chunk list is
      necessary, the implementation uses a fixed maximum size of the
      transport header. Currently that maximum size is 256 bytes, one
      quarter of the default inline threshold size for RPC/RDMA v1.
      
      Since commit a7886849 ("xprtrdma: Reduce max_frwr_depth"), the
      size of chunks is also smaller to take advantage of inline page
      lists in device internal MR data structures.
      
      The combination of these two design choices has reduced the maximum
      NFS rsize and wsize that can be used for most RNIC/HCAs. Increasing
      the maximum transport header size and the maximum number of RDMA
      segments it can contain increases the negotiated maximum rsize/wsize
      on common RNIC/HCAs.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      f3c66a2f
    • C
      xprtrdma: Update obsolete comment · af08a775
      Chuck Lever 提交于
      Comment was made obsolete by commit 8cec3dba ("xprtrdma:
      rpcrdma_regbuf alignment").
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      af08a775
  5. 18 7月, 2019 1 次提交
  6. 09 7月, 2019 8 次提交
    • C
      xprtrdma: Modernize ops->connect · 675dd90a
      Chuck Lever 提交于
      Adapt and apply changes that were made to the TCP socket connect
      code. See the following commits for details on the purpose of
      these changes:
      
      Commit 7196dbb0 ("SUNRPC: Allow changing of the TCP timeout parameters on the fly")
      Commit 3851f1cd ("SUNRPC: Limit the reconnect backoff timer to the max RPC message timeout")
      Commit 02910177 ("SUNRPC: Fix reconnection timeouts")
      
      Some common transport code is moved to xprt.c to satisfy the code
      duplication police.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      675dd90a
    • C
      xprtrdma: Remove rpcrdma_req::rl_buffer · 5828ceba
      Chuck Lever 提交于
      Clean up.
      
      There is only one remaining function, rpcrdma_buffer_put(), that
      uses this field. Its caller can supply a pointer to the correct
      rpcrdma_buffer, enabling the removal of an 8-byte pointer field
      from a frequently-allocated shared data structure.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      5828ceba
    • C
      xprtrdma: Wake RPCs directly in rpcrdma_wc_send path · 0ab11523
      Chuck Lever 提交于
      Eliminate a context switch in the path that handles RPC wake-ups
      when a Receive completion has to wait for a Send completion.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      0ab11523
    • C
      xprtrdma: Reduce context switching due to Local Invalidation · d8099fed
      Chuck Lever 提交于
      Since commit ba69cd12 ("xprtrdma: Remove support for FMR memory
      registration"), FRWR is the only supported memory registration mode.
      
      We can take advantage of the asynchronous nature of FRWR's LOCAL_INV
      Work Requests to get rid of the completion wait by having the
      LOCAL_INV completion handler take care of DMA unmapping MRs and
      waking the upper layer RPC waiter.
      
      This eliminates two context switches when local invalidation is
      necessary. As a side benefit, we will no longer need the per-xprt
      deferred completion work queue.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      d8099fed
    • C
      xprtrdma: Add mechanism to place MRs back on the free list · 40088f0e
      Chuck Lever 提交于
      When a marshal operation fails, any MRs that were already set up for
      that request are recycled. Recycling releases MRs and creates new
      ones, which is expensive.
      
      Since commit f2877623 ("xprtrdma: Chain Send to FastReg WRs")
      was merged, recycling FRWRs is unnecessary. This is because before
      that commit, frwr_map had already posted FAST_REG Work Requests,
      so ownership of the MRs had already been passed to the NIC and thus
      dealing with them had to be delayed until they completed.
      
      Since that commit, however, FAST_REG WRs are posted at the same time
      as the Send WR. This means that if marshaling fails, we are certain
      the MRs are safe to simply unmap and place back on the free list
      because neither the Send nor the FAST_REG WRs have been posted yet.
      The kernel still has ownership of the MRs at this point.
      
      This reduces the total number of MRs that the xprt has to create
      under heavy workloads and makes the marshaling logic less brittle.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      40088f0e
    • C
      xprtrdma: Remove fr_state · 84756894
      Chuck Lever 提交于
      Now that both the Send and Receive completions are handled in
      process context, it is safe to DMA unmap and return MRs to the
      free or recycle lists directly in the completion handlers.
      
      Doing this means rpcrdma_frwr no longer needs to track the state of
      each MR, meaning that a VALID or FLUSHED MR can no longer appear on
      an xprt's MR free list. Thus there is no longer a need to track the
      MR's registration state in rpcrdma_frwr.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      84756894
    • C
      xprtrdma: Remove the RPCRDMA_REQ_F_PENDING flag · 5809ea4f
      Chuck Lever 提交于
      Commit 9590d083 ("xprtrdma: Use xprt_pin_rqst in
      rpcrdma_reply_handler") pins incoming RPC/RDMA replies so they
      can be left in the pending requests queue while they are being
      processed without introducing a race between ->buf_free and the
      transport's reply handler. Therefore RPCRDMA_REQ_F_PENDING is no
      longer necessary.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      5809ea4f
    • C
      xprtrdma: Fix occasional transport deadlock · 05eb06d8
      Chuck Lever 提交于
      Under high I/O workloads, I've noticed that an RPC/RDMA transport
      occasionally deadlocks (IOPS goes to zero, and doesn't recover).
      Diagnosis shows that the sendctx queue is empty, but when sendctxs
      are returned to the queue, the xprt_write_space wake-up never
      occurs. The wake-up logic in rpcrdma_sendctx_put_locked is racy.
      
      I noticed that both EMPTY_SCQ and XPRT_WRITE_SPACE are implemented
      via an atomic bit. Just one of those is sufficient. Removing
      EMPTY_SCQ in favor of the generic bit mechanism makes the deadlock
      un-reproducible.
      
      Without EMPTY_SCQ, rpcrdma_buffer::rb_flags is no longer used and
      is therefore removed.
      
      Unfortunately this patch does not apply cleanly to stable. If
      needed, someone will have to port it and test it.
      
      Fixes: 2fad6592 ("xprtrdma: Wait on empty sendctx queue")
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      05eb06d8
  7. 26 4月, 2019 13 次提交
  8. 13 2月, 2019 2 次提交
    • C
      xprtrdma: Reduce the doorbell rate (Receive) · e340c2d6
      Chuck Lever 提交于
      Post RECV WRs in batches to reduce the hardware doorbell rate per
      transport. This helps the RPC-over-RDMA client scale better in
      number of transports.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      e340c2d6
    • C
      xprtrdma: Fix sparse warnings · ec482cc1
      Chuck Lever 提交于
      linux/net/sunrpc/xprtrdma/rpc_rdma.c:375:63: warning: incorrect type in argument 5 (different base types)
      linux/net/sunrpc/xprtrdma/rpc_rdma.c:375:63:    expected unsigned int [usertype] xid
      linux/net/sunrpc/xprtrdma/rpc_rdma.c:375:63:    got restricted __be32 [usertype] rq_xid
      linux/net/sunrpc/xprtrdma/rpc_rdma.c:432:62: warning: incorrect type in argument 5 (different base types)
      linux/net/sunrpc/xprtrdma/rpc_rdma.c:432:62:    expected unsigned int [usertype] xid
      linux/net/sunrpc/xprtrdma/rpc_rdma.c:432:62:    got restricted __be32 [usertype] rq_xid
      linux/net/sunrpc/xprtrdma/rpc_rdma.c:489:62: warning: incorrect type in argument 5 (different base types)
      linux/net/sunrpc/xprtrdma/rpc_rdma.c:489:62:    expected unsigned int [usertype] xid
      linux/net/sunrpc/xprtrdma/rpc_rdma.c:489:62:    got restricted __be32 [usertype] rq_xid
      
      Fixes: 0a93fbcb ("xprtrdma: Plant XID in on-the-wire RDMA ... ")
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      ec482cc1