Linux NFS development
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Tom Tucker <tom@opengridcomputing.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 02/11] svcrdma: Use RPC reply map for RDMA_WRITE processing
Date: Mon, 23 Jun 2008 14:51:26 -0400	[thread overview]
Message-ID: <20080623185126.GD24373@fieldses.org> (raw)
In-Reply-To: <485D3186.2000307@opengridcomputing.com>

On Sat, Jun 21, 2008 at 11:51:18AM -0500, Tom Tucker wrote:
> J. Bruce Fields wrote:
>> On Thu, May 29, 2008 at 12:54:47PM -0500, Tom Tucker wrote:
>>   
>>> Use the new svc_rdma_req_map data type for mapping the client side memory
>>> to the server side memory. Move the DMA mapping to the context pointed to
>>> by each WR individually so that it is unmapped after the WR completes.
>>>
>>> Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
>>>
>>> ---
>>>  net/sunrpc/xprtrdma/svc_rdma_sendto.c    |  122 ++++++++++++++----------------
>>>  net/sunrpc/xprtrdma/svc_rdma_transport.c |    5 +-
>>>  2 files changed, 62 insertions(+), 65 deletions(-)
>>>
>>> diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
>>> index fb82b1b..7cd65b7 100644
>>> --- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c
>>> +++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
>>> @@ -64,10 +64,9 @@
>>>   * SGE[sge_count-1]    data from xdr->tail.
>>>   *
>>>   */
>>> -static struct ib_sge *xdr_to_sge(struct svcxprt_rdma *xprt,
>>> -				 struct xdr_buf *xdr,
>>> -				 struct ib_sge *sge,
>>> -				 int *sge_count)
>>> +static void xdr_to_sge(struct svcxprt_rdma *xprt,
>>> +		       struct xdr_buf *xdr,
>>> +		       struct svc_rdma_req_map *vec)
>>>  {
>>>  	/* Max we need is the length of the XDR / pagesize + one for
>>>  	 * head + one for tail + one for RPCRDMA header
>>> @@ -84,14 +83,10 @@ static struct ib_sge *xdr_to_sge(struct svcxprt_rdma *xprt,
>>>  	sge_no = 1;
>>>     
>>
>> Should the arrays in the svc_rdma_req_map actually be size
>> RPC_SVC_MAXPAGES+1 to allow for the RPCRDMA header?
>>
>>   
> Actually, upon further inspection, this is not a bug. The  
> RPCSVC_MAXPAGES is used to size the rqstp
> page array. This array includes a page for the request hdr, reply hdr  
> and one extra page for alignment. For
> our use case, the reply hdr page covers the RDMA header.

OK, that makes sense.  (Let's just fix the comment above so I don't
forget and ask the same question again next time.)

> However, I think this payload length should be clamped in a different  
> way. It seems silly to allocate these
> things to handle big-data mounts that are rarely used in practice. I  
> think it's better to have a transport max
> that is more reasonable by default and a module parameter that is  
> configurable if you're looking to do big-data
> mounts.
>
> Thoughts?

This is decided in fs/nfsd/nfssvc.c:nfsd_create_serv(), based on the
machine's ram size, and can be overridden with the nfsd filesystem's
maxblksize parameter.

I'm open to suggestions, but my feeling is that it's hard to educate
people about how to use additional sysctl's, and that it's reasonable to
waste some memory to get good out-of-the-box performance on streaming
IO.

See also recent patches from Olga and Dean for similar discussion
(about WAN tcp performance in their case, since the size of these
buffers affects the size of the tcp window we advertise).

--b.

  reply	other threads:[~2008-06-23 18:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <12120836962076-git-send-email-tom@opengridcomputing.com>
2008-05-29 22:10 ` [PATCH 0/11] svcrdma: WR context management bug fixes and cleanup J. Bruce Fields
2008-05-29 22:25   ` Tom Tucker
     [not found]     ` <1212099937.22478.3.camel-SMNkleLxa3ZimH42XvhXlA@public.gmane.org>
2008-05-29 22:26       ` Roland Dreier
     [not found] ` <12120836962324-git-send-email-tom@opengridcomputing.com>
2008-06-16 19:48   ` [PATCH 01/11] svcrdma: Add a type for keeping NFS RPC mapping J. Bruce Fields
2008-06-21 16:31     ` Tom Tucker
2008-06-23 18:27       ` J. Bruce Fields
2008-06-24  2:58         ` Tom Tucker
2008-06-24 19:58           ` J. Bruce Fields
2008-06-24 20:31             ` Benny Halevy
2008-06-24 20:38             ` Trond Myklebust
     [not found]   ` <12120836963727-git-send-email-tom@opengridcomputing.com>
2008-06-16 21:04     ` [PATCH 02/11] svcrdma: Use RPC reply map for RDMA_WRITE processing J. Bruce Fields
2008-06-21 16:26       ` Tom Tucker
2008-06-23 18:21         ` J. Bruce Fields
2008-06-24  2:29           ` Tom Tucker
2008-06-21 16:51       ` Tom Tucker
2008-06-23 18:51         ` J. Bruce Fields [this message]
2008-06-24  3:02           ` Tom Tucker
     [not found]     ` <1212083697950-git-send-email-tom@opengridcomputing.com>
     [not found]       ` <1212083697236-git-send-email-tom@opengridcomputing.com>
     [not found]         ` <12120836973390-git-send-email-tom@opengridcomputing.com>
     [not found]           ` <12120836973638-git-send-email-tom@opengridcomputing.com>
     [not found]             ` <12120836973072-git-send-email-tom@opengridcomputing.com>
     [not found]               ` <12120836972503-git-send-email-tom@opengridcomputing.com>
     [not found]                 ` <12120836973166-git-send-email-tom@opengridcomputing.com>
     [not found]                   ` <12120836972648-git-send-email-tom@opengridcomputing.com>
2008-06-16 21:24                     ` [PATCH 10/11] svcrdma: Create a kmem cache for the WR contexts J. Bruce Fields
2008-06-21 17:08                       ` Tom Tucker
2008-07-03  2:27 [PATCH 00/11] svcrdma: WR context management bug fixes and cleanup Tom Tucker
2008-07-03  2:27 ` [PATCH 01/11] svcrdma: Add a type for keeping NFS RPC mapping Tom Tucker
2008-07-03  2:27   ` [PATCH 02/11] svcrdma: Use RPC reply map for RDMA_WRITE processing Tom Tucker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080623185126.GD24373@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=tom@opengridcomputing.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox