From: Steven Whitehouse <swhiteho@redhat.com>
To: Andreas Gruenbacher <agruenba@redhat.com>, cluster-devel@redhat.com
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
NeilBrown <neilb@suse.com>, Thomas Graf <tgraf@suug.ch>,
Tom Herbert <tom@quantonium.net>
Subject: Re: [Cluster-devel] [PATCH v2 0/2] gfs2: Stop using rhashtable_walk_peek
Date: Thu, 29 Mar 2018 13:24:06 +0100 [thread overview]
Message-ID: <b15f44f6-d052-17f2-b099-ea2d601c9a6e@redhat.com> (raw)
In-Reply-To: <20180329120612.6104-1-agruenba@redhat.com>
Hi,
Can we solve the problem another way, by not taking refs on the glocks
when we are iterating over them for the debugfs files? I assume that is
the main issue here.
We didn't used to take refs since the rcu locking was enough during the
walk itself. We used to only keep track of the hash bucket and offset
within the bucket when we dropped the rcu lock between calls to the
iterator. I may have lost track of why that approach did not work?
Steve.
On 29/03/18 13:06, Andreas Gruenbacher wrote:
> Here's a second version of the patch (now a patch set) to eliminate
> rhashtable_walk_peek in gfs2.
>
> The first patch introduces lockref_put_not_zero, the inverse of
> lockref_get_not_zero.
>
> The second patch eliminates rhashtable_walk_peek in gfs2. In
> gfs2_glock_iter_next, the new lockref function from patch one is used to
> drop a lockref count as long as the count doesn't drop to zero. This is
> almost always the case; if there is a risk of dropping the last
> reference, we must defer that to a work queue because dropping the last
> reference may sleep.
>
> Thanks,
> Andreas
>
> Andreas Gruenbacher (2):
> lockref: Add lockref_put_not_zero
> gfs2: Stop using rhashtable_walk_peek
>
> fs/gfs2/glock.c | 47 ++++++++++++++++++++++++++++-------------------
> include/linux/lockref.h | 1 +
> lib/lockref.c | 28 ++++++++++++++++++++++++++++
> 3 files changed, 57 insertions(+), 19 deletions(-)
>
next prev parent reply other threads:[~2018-03-29 12:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-29 12:06 Andreas Gruenbacher
2018-03-29 12:06 ` [PATCH v2 1/2] lockref: Add lockref_put_not_zero Andreas Gruenbacher
2018-03-29 12:06 ` [PATCH v2 2/2] gfs2: Stop using rhashtable_walk_peek Andreas Gruenbacher
2018-03-29 12:24 ` Steven Whitehouse [this message]
2018-03-29 13:12 ` [Cluster-devel] [PATCH v2 0/2] " Andreas Gruenbacher
2018-03-29 12:35 ` Herbert Xu
2018-03-29 13:15 ` Andreas Gruenbacher
2018-03-29 15:41 ` Herbert Xu
2018-03-29 16:52 ` Andreas Gruenbacher
2018-03-29 17:06 ` Herbert Xu
2018-04-03 3:41 ` NeilBrown
2018-04-03 4:03 ` Herbert Xu
2018-04-04 15:46 ` [Cluster-devel] " Bob Peterson
2018-04-04 15:48 ` Herbert Xu
[not found] ` <CAHpGcMKxDNOkMMKB1_9H0ob-502cD89E-94a18prp91y_a52GA@mail.gmail.com>
2018-04-06 1:33 ` NeilBrown
2018-04-12 17:00 ` Bob Peterson
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=b15f44f6-d052-17f2-b099-ea2d601c9a6e@redhat.com \
--to=swhiteho@redhat.com \
--cc=agruenba@redhat.com \
--cc=cluster-devel@redhat.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.com \
--cc=netdev@vger.kernel.org \
--cc=tgraf@suug.ch \
--cc=tom@quantonium.net \
/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
all inboxes | Powered by JetHome®