From: "J. Bruce Fields" <bfields@fieldses.org>
To: Trond Myklebust <trondmy@gmail.com>
Cc: "Reshetova, Elena" <elena.reshetova@intel.com>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"jlayton@kernel.org" <jlayton@kernel.org>,
"anna.schumaker@netapp.com" <anna.schumaker@netapp.com>,
"peterz@infradead.org" <peterz@infradead.org>,
"keescook@chromium.org" <keescook@chromium.org>
Subject: Re: [PATCH 1/4] lockd: convert nlm_host.h_count from atomic_t to refcount_t
Date: Wed, 24 Jan 2018 16:09:50 -0500 [thread overview]
Message-ID: <20180124210950.GA12840@fieldses.org> (raw)
In-Reply-To: <1516754851.18068.3.camel@gmail.com>
On Tue, Jan 23, 2018 at 07:47:31PM -0500, Trond Myklebust wrote:
> Sorry I forgot about the issues with the server garbage collector, and
> I applied these patches to my linux-next a couple of weeks ago.
Whoops, OK, so who's taking those patches anyway?
> What say we fix the issue with something like the following?
...
> @@ -662,8 +664,7 @@ nlm_gc_hosts(struct net *net)
> for_each_host_safe(host, next, chain, nlm_server_hosts) {
> if (net && host->net != net)
> continue;
> - if (refcount_read(&host->h_count) || host->h_inuse
> - || time_before(jiffies, host->h_expires)) {
> + if (host->h_inuse || time_before(jiffies, host->h_expires)) {
Can you really just drop the h_count check?
Oh, I see:
> @@ -671,7 +672,8 @@ nlm_gc_hosts(struct net *net)
> host->net->ns.inum);
> continue;
> }
> - nlm_destroy_host_locked(host);
> + if (refcount_dec_if_one(&host->h_count))
> + nlm_destroy_host_locked(host);
So this is check that replaces it.
Makes sense to me, thanks. ACK to the patch.
--b.
> }
>
> if (net) {
> --
> 2.14.3
>
> --
> Trond Myklebust
> Linux NFS client maintainer, PrimaryData
> trond.myklebust@primarydata.com
next prev parent reply other threads:[~2018-01-24 21:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-29 11:15 [PATCH 0/4] lockd refcount conversions Elena Reshetova
2017-11-29 11:15 ` [PATCH 1/4] lockd: convert nlm_host.h_count from atomic_t to refcount_t Elena Reshetova
2017-12-21 20:23 ` J. Bruce Fields
2017-12-22 9:29 ` Reshetova, Elena
2017-12-22 14:25 ` J. Bruce Fields
2017-12-22 15:42 ` J. Bruce Fields
2017-12-27 12:10 ` Reshetova, Elena
2018-01-23 22:09 ` J. Bruce Fields
2018-01-24 0:47 ` Trond Myklebust
2018-01-24 21:09 ` J. Bruce Fields [this message]
2017-11-29 11:15 ` [PATCH 2/4] lockd: convert nsm_handle.sm_count " Elena Reshetova
2017-11-29 11:15 ` [PATCH 3/4] lockd: convert nlm_lockowner.count " Elena Reshetova
2017-11-29 11:15 ` [PATCH 4/4] lockd: convert nlm_rqst.a_count " Elena Reshetova
2017-11-29 22:23 ` [PATCH 0/4] lockd refcount conversions J. Bruce Fields
2017-11-30 7:48 ` Reshetova, Elena
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=20180124210950.GA12840@fieldses.org \
--to=bfields@fieldses.org \
--cc=anna.schumaker@netapp.com \
--cc=elena.reshetova@intel.com \
--cc=jlayton@kernel.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=trondmy@gmail.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;
as well as URLs for NNTP newsgroup(s).