From: Greg Banks <gnb-cP1dWloDopni96+mSzHFpQC/G2K4zDHf@public.gmane.org>
To: Tom Tucker <tom@opengridcomputing.com>
Cc: "J. Bruce Fields" <bfields@fieldses.org>,
Trond Myklebust <trond.myklebust@fys.uio.no>,
linux-nfs@vger.kernel.org
Subject: Re: [Fwd: Re: Linux 2.6.25-rc2]
Date: Tue, 19 Feb 2008 19:00:51 +1100 [thread overview]
Message-ID: <47BA8CB3.4030703@melbourne.sgi.com> (raw)
In-Reply-To: <1203358682.24272.31.camel-SMNkleLxa3ZimH42XvhXlA@public.gmane.org>
Tom Tucker wrote:
> Bruce:
>
> I'll take a look...
>
> Tom
>
> On Mon, 2008-02-18 at 12:45 -0500, J. Bruce Fields wrote:
>
>> On Sun, Feb 17, 2008 at 04:02:45PM -0500, Trond Myklebust wrote:
>>
>>> Hi Bruce,
>>>
>>> Here is a question for you.
>>>
>>> Why does svc_close_all() get away with deleting xprt->xpt_ready
>>> without holding the pool->sp_lock?
>>>
>> >From a quick look--I think the intention is that the code that calls it
>> (in svc_destroy()) is only called after all other server threads have
>> exited, and that there can't be anyone else monkeying with that service
>> any more. But I haven't verified that really carefully.
>>
That's certainly the intention. The serv->sv_nrthreads fields is used
as a refcount, which counts 1 for each nfsd thread and sometimes 1 to
guard some short-term manipulations. This refcount should not drop to
zero until the last thread exits. So by the time svc_close_all() is
called, no thread can be looking at a pool's sp_sockets list. Each
xprt could still be racily added to that list from softirq mode data
ready handlers calling svc_xprt_enqueue(), but only until the xprt's
xpo_detach method is called (which removes any data ready callbacks).
At that point, no code should be modifying the xpt_ready field, and
it may or may not be used to link the xprt into some pool->sp_sockets
but we don't care because all the pools are about to be destroyed
anyway.
That's the way it's been working since 2.6.19, and I don't think any
of Tom's patches changed that.
I can think of a couple of things that could be wrong:
* serv->sv_nrthreads is used in a few places, and there might
be bugs in that which are getting that count wrong (when I left
the code, all increments and decrements of that field went through
svc_get() and svc_destroy(), but other changes have crept in).
* Currently running data ready callbacks might be racing with xpo_detach.
Moving that call inside the spin_lock_bh() critical section just
after it might help.
>>>> For more on this problem see http://marc.info/?l=linux-kernel&m=120293042005445
>>>>
>>> There's the Bugzilla entry for it at
>>>
>>>
>
>
> http://bugzilla.kernel.org/show_bug.cgi?id=9973
>
It's not clear from the bugzilla that NFS is at fault here.
--
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
The cake is *not* a lie.
I don't speak for SGI.
next prev parent reply other threads:[~2008-02-19 7:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1203282165.2929.7.camel@heimdal.trondhjem.org>
[not found] ` <1203282165.2929.7.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-02-18 17:45 ` [Fwd: Re: Linux 2.6.25-rc2] J. Bruce Fields
2008-02-18 18:18 ` Tom Tucker
[not found] ` <1203358682.24272.31.camel-SMNkleLxa3ZimH42XvhXlA@public.gmane.org>
2008-02-19 8:00 ` Greg Banks [this message]
[not found] ` <47BA8CB3.4030703-cP1dWloDopni96+mSzHFpQC/G2K4zDHf@public.gmane.org>
2008-02-20 18:52 ` 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=47BA8CB3.4030703@melbourne.sgi.com \
--to=gnb-cp1dwlodopni96+mszhfpqc/g2k4zdhf@public.gmane.org \
--cc=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=tom@opengridcomputing.com \
--cc=trond.myklebust@fys.uio.no \
/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