[PATCH v1 0/6] Restructure how svcrdma handles RDMA Read

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi-

I'm on a "mission" to reduce the amount of page allocator churn
that happens during server-side RPC call processing.

In the case where svcrdma needs to perform an RDMA Read to pull
Read chunks from a client, currently two calls to svc_rdma_recvfrom
are necessary:

Call 1:

An ingress Receive is processed. If there are Read chunks, the
transport strips the pages out of the passed-in svc_rqst, sets up
the RDMA Read with those pages and posts the Read, then returns
the svc_rqst with missing pages. Return value of zero means no
RPC Call is ready yet.

---

Meanwhile svc has to refill those pages in the svc_rqst to
prepare it for the next incoming RPC.

---

Call 2:

The Read completion has occurred. The transport strips the pages
out of the passed-in svc_rqst and frees them. It copies the
pages from the Read sink buffer into the svc_rqst, and returns
the completed RPC.

---


Instead, let's do the RDMA Reads synchronously with a single call to
svc_rdma_recvfrom(). When svc_rdma_recvfrom() handles an ingress
Receive with Read chunks, set up the RDMA Read sink buffer using the
available pages in the svc_rqst, and wait right there for
completion.

For large Read chunks, this avoids freeing a bunch of pages and then
allocating them again. Fewer trips to the page allocator means less
time with IRQs disabled, and measurably faster turn-around for the
next RPC.

Also, now that XPT_BUSY is cleared immediately when a Receive is
dequeued, the transport can handle a higher rate of incoming RPCs.


---

Chuck Lever (6):
      SUNRPC: Export svc_xprt_received()
      SUNRPC: Move svc_xprt_received() call sites
      svcrdma: Single-stage RDMA Read
      svcrdma: Remove sc_read_complete_q
      svcrdma: Remove svc_rdma_recv_ctxt::rc_pages and ::rc_arg
      svcrdma: Clean up dto_q critical section in svc_rdma_recvfrom()


 include/linux/sunrpc/svc_rdma.h          |   5 --
 net/sunrpc/svc_xprt.c                    |   7 +-
 net/sunrpc/svcsock.c                     |   9 +-
 net/sunrpc/xprtrdma/svc_rdma_recvfrom.c  |  76 +++-------------
 net/sunrpc/xprtrdma/svc_rdma_rw.c        | 108 ++++++++---------------
 net/sunrpc/xprtrdma/svc_rdma_transport.c |   1 -
 6 files changed, 60 insertions(+), 146 deletions(-)

--
Chuck Lever




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux