From: "J. Bruce Fields" <bfields@fieldses.org>
To: Tom Tucker <tom@opengridcomputing.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 1/17] svcrdma: Simplify receive buffer posting
Date: Mon, 5 May 2008 15:31:40 -0400 [thread overview]
Message-ID: <20080505193140.GC12814@fieldses.org> (raw)
In-Reply-To: <12097457213375-git-send-email-tom@opengridcomputing.com>
On Fri, May 02, 2008 at 11:28:27AM -0500, Tom Tucker wrote:
> The svcrdma transport provider currently allocates receive buffers
> to the RQ through the xpo_release_rqst method. This approach is overly
> complicated since it means that the rqstp rq_xprt_ctxt has to be
> selectively set based on whether the RPC is going to be processed
> immediately or deferred. Instead, just post the receive buffer when
> we are certain that we are replying in the send_reply function.
Makes sense to me. But, by the way:
> index af408fc..1e0af2f 100644
> --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
> +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
> @@ -910,27 +910,8 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
> return NULL;
> }
>
> -/*
> - * Post an RQ WQE to the RQ when the rqst is being released. This
> - * effectively returns an RQ credit to the client. The rq_xprt_ctxt
> - * will be null if the request is deferred due to an RDMA_READ or the
> - * transport had no data ready (EAGAIN). Note that an RPC deferred in
> - * svc_process will still return the credit, this is because the data
> - * is copied and no longer consume a WQE/WC.
> - */
> static void svc_rdma_release_rqst(struct svc_rqst *rqstp)
> {
> - int err;
> - struct svcxprt_rdma *rdma =
> - container_of(rqstp->rq_xprt, struct svcxprt_rdma, sc_xprt);
> - if (rqstp->rq_xprt_ctxt) {
> - BUG_ON(rqstp->rq_xprt_ctxt != rdma);
> - err = svc_rdma_post_recv(rdma);
> - if (err)
> - dprintk("svcrdma: failed to post an RQ WQE error=%d\n",
> - err);
> - }
> - rqstp->rq_xprt_ctxt = NULL;
> }
Why is it that the svcsock equivalent (svc_release_skb) frees
rqstp->rq_deferred, but this doesn't? Don't we need to free that in the
rdma case too?
--b.
next prev parent reply other threads:[~2008-05-05 19:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1209745721600-git-send-email-tom@opengridcomputing.com>
2008-05-02 22:37 ` [PATCH 0/17] svcrdma: RDMA transport driver close path cleanup J. Bruce Fields
2008-05-02 23:05 ` Tom Tucker
[not found] ` <12097457211326-git-send-email-tom@opengridcomputing.com>
[not found] ` <1209745721248-git-send-email-tom@opengridcomputing.com>
[not found] ` <12097457213375-git-send-email-tom@opengridcomputing.com>
2008-05-05 19:31 ` J. Bruce Fields [this message]
[not found] ` <12097457212336-git-send-email-tom@opengridcomputing.com>
[not found] ` <12097457212951-git-send-email-tom@opengridcomputing.com>
[not found] ` <12097457211122-git-send-email-tom@opengridcomputing.com>
[not found] ` <12097457223433-git-send-email-tom@opengridcomputing.com>
[not found] ` <12097457223971-git-send-email-tom@opengridcomputing.com>
[not found] ` <12097457223635-git-send-email-tom@opengridcomputing.com>
[not found] ` <12097457223351-git-send-email-tom@opengridcomputing.com>
2008-05-05 22:06 ` [PATCH 2/17] svcrdma: Fix race with dto_tasklet in svc_rdma_send J. Bruce Fields
2008-05-06 2:26 ` Tom Tucker
2008-05-06 21:18 ` J. Bruce Fields
2008-05-07 0:45 ` Tom Tucker
[not found] ` <12097457221640-git-send-email-tom@opengridcomputing.com>
2008-05-05 22:08 ` [PATCH 3/17] svcrdma: Fix return value " J. Bruce Fields
2008-05-06 2:03 ` Tom Tucker
2008-05-06 21:08 ` J. Bruce Fields
[not found] ` <120974572253-git-send-email-tom@opengridcomputing.com>
[not found] ` <12097457223519-git-send-email-tom@opengridcomputing.com>
[not found] ` <12097457223927-git-send-email-tom@opengridcomputing.com>
[not found] ` <12097457232986-git-send-email-tom@opengridcomputing.com>
2008-05-05 22:41 ` [PATCH 7/17] svcrdma: Fix error handling during listening endpoint creation J. Bruce Fields
2008-05-06 14:48 ` Tom Tucker
2008-05-06 21:22 ` J. Bruce Fields
2008-05-07 0:48 ` Tom Tucker
2008-05-07 1:30 ` J. Bruce Fields
[not found] ` <12097457231736-git-send-email-tom@opengridcomputing.com>
2008-05-05 22:52 ` [PATCH 8/17] svcrdma: Return error from rdma_read_xdr so caller knows to free context J. Bruce Fields
2008-05-06 2:05 ` Tom Tucker
2008-05-06 21:32 ` [PATCH 11/17] svcrdma: Use standard Linux lists for context cache J. Bruce Fields
2008-05-07 0:49 ` Tom Tucker
2008-05-06 21:46 ` [PATCH 0/17] svcrdma: RDMA transport driver close path cleanup J. Bruce Fields
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=20080505193140.GC12814@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