From: "J. Bruce Fields" <bfields@fieldses.org>
To: Neil Brown <neilb@suse.de>
Cc: Tom Tucker <tom@opengridcomputing.com>,
linux-nfs@vger.kernel.org, Wei Yongjun <yjwei@cn.fujitsu.com>
Subject: Re: The recent kref_put warning (was: [PATCH] sunrpc: remove unnecessary svc_xprt_put)
Date: Mon, 1 Mar 2010 18:20:37 -0500 [thread overview]
Message-ID: <20100301232037.GO23539@fieldses.org> (raw)
In-Reply-To: <20100301231956.GN23539@fieldses.org>
On Mon, Mar 01, 2010 at 06:19:56PM -0500, J. Bruce Fields wrote:
> On Mon, Mar 01, 2010 at 09:50:15AM -0500, J. Bruce Fields wrote:
> > On Mon, Mar 01, 2010 at 04:51:14PM +1100, Neil Brown wrote:
> > > On Sun, 28 Feb 2010 22:46:47 -0500
> > > "J. Bruce Fields" <bfields@fieldses.org> wrote:
> > >
> > > > On Mon, Mar 01, 2010 at 10:57:34AM +1100, Neil Brown wrote:
> > > > > No, you are correct. "return 0" is wrong, it should be "return -EAGAIN",
> > > > > both in the XPT_CLOSE case and the XPT_LISTENER case.
> > > > >
> > > > > I observed that in both those cases, 'len' remained at 0 and we didn't do
> > > > > much else but 'return len', so I optimised.
> > > > > I forgot to factor in:
> > > > >
> > > > > if (len == 0 || len == -EAGAIN) {
> > > > > rqstp->rq_res.len = 0;
> > > > > svc_xprt_release(rqstp);
> > > > > return -EAGAIN;
> > > > > }
> > > > >
> > > > > So the svc_xprt_release needs to be moved in there as well, I'm not sure
> > > > > about the rq_res.len = 0.
> > > > > Maybe that was a bad case of premature-optimisation :-)
> > > > >
> > > > > We should probably leave that last else clause as it is and just have a
> > > > > single return from the function.
> > > >
> > > > OK, so the below is what I'm thinking of sending, after some testing;
> > > > really just a split-up version of your patches (uh, so credits may be
> > > > wrong) with the final cleanup removed:
> > >
> > > Credits and code look OK the me, thanks.
>
> And, by the way, this is all ready to submit--but I'd like to avoid
> having to revert anything more, and as part of that I'd greatly
> appreciate any testing results, however partial.
(I've run my basic regression tests, but they were never enough to
reproduce the refcnt warning others were seeing.)
--b.
next prev parent reply other threads:[~2010-03-01 23:19 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-26 22:33 [PATCH] sunrpc: remove unnecessary svc_xprt_put Neil Brown
[not found] ` <19336.19524.469529.431210-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2010-02-26 22:44 ` J. Bruce Fields
2010-02-26 22:54 ` J. Bruce Fields
2010-02-27 0:40 ` Tom Tucker
2010-02-27 1:35 ` Neil Brown
[not found] ` <20100227123537.6289e326-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2010-02-27 2:38 ` Tom Tucker
2010-03-01 4:23 ` Neil Brown
[not found] ` <20100301152310.750f3504-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2010-03-01 14:44 ` J. Bruce Fields
2010-02-27 5:59 ` The recent kref_put warning (was: [PATCH] sunrpc: remove unnecessary svc_xprt_put) Neil Brown
[not found] ` <20100227165913.53718449-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2010-02-28 0:46 ` The recent kref_put warning Tom Tucker
2010-02-28 21:05 ` The recent kref_put warning (was: [PATCH] sunrpc: remove unnecessary svc_xprt_put) J. Bruce Fields
2010-02-28 22:07 ` J. Bruce Fields
2010-02-28 23:57 ` Neil Brown
[not found] ` <20100301105734.7fe935b0-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2010-03-01 3:46 ` J. Bruce Fields
2010-03-01 3:48 ` J. Bruce Fields
2010-03-01 5:51 ` Neil Brown
[not found] ` <20100301165114.74d2797b-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2010-03-01 14:50 ` J. Bruce Fields
2010-03-01 23:19 ` J. Bruce Fields
2010-03-01 23:20 ` J. Bruce Fields [this message]
2010-04-28 21:43 ` 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=20100301232037.GO23539@fieldses.org \
--to=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=tom@opengridcomputing.com \
--cc=yjwei@cn.fujitsu.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