From: Bob Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 2/2] gfs2: Fix lru_count going negative
Date: Thu, 31 Jan 2019 10:04:18 -0500 (EST) [thread overview]
Message-ID: <359471440.68850881.1548947058822.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1247235469.68837763.1548945397399.JavaMail.zimbra@redhat.com>
----- Original Message -----
> > +
> > + if (!test_bit(GLF_LRU, &gl->gl_flags)) {
> > + set_bit(GLF_LRU, &gl->gl_flags);
> > atomic_inc(&lru_count);
> > + }
>
> The above may be simplified to something like:
> + if (!test_and_set_bit(GLF_LRU, &gl->gl_flags))
> atomic_inc(&lru_count);
Scratch that. Andreas says test_and_set_bit() and similar are much more
expensive cpu-wise, and we're already protected from races by the
lru_lock, so I guess the original is better after all.
Bob Peterson
next prev parent reply other threads:[~2019-01-31 15:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-31 10:55 [Cluster-devel] [PATCH 0/2] GFS2 counting fixes Ross Lagerwall
2019-01-31 10:55 ` [Cluster-devel] [PATCH 1/2] gfs2: Fix occasional glock use-after-free Ross Lagerwall
2019-01-31 11:23 ` Steven Whitehouse
2019-01-31 14:40 ` Bob Peterson
2019-01-31 17:18 ` Andreas Gruenbacher
2019-02-01 9:23 ` Ross Lagerwall
2019-02-01 14:34 ` Bob Peterson
2019-02-01 14:51 ` Bob Peterson
2019-02-01 15:03 ` [Cluster-devel] [PATCH 1/2] gfs2: Fix occasional glock use-after-free (Another debug patch) Bob Peterson
2019-03-26 18:49 ` [Cluster-devel] [PATCH 1/2] gfs2: Fix occasional glock use-after-free Ross Lagerwall
2019-03-26 19:14 ` Bob Peterson
2019-04-01 22:59 ` Andreas Gruenbacher
2019-04-05 17:50 ` Andreas Gruenbacher
2019-04-09 15:36 ` Ross Lagerwall
2019-04-09 15:41 ` Andreas Gruenbacher
2019-01-31 10:55 ` [Cluster-devel] [PATCH 2/2] gfs2: Fix lru_count going negative Ross Lagerwall
2019-01-31 11:21 ` Steven Whitehouse
2019-01-31 14:36 ` Bob Peterson
2019-01-31 15:04 ` Bob Peterson [this message]
2019-01-31 15:23 ` Ross Lagerwall
2019-01-31 18:32 ` Andreas Gruenbacher
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=359471440.68850881.1548947058822.JavaMail.zimbra@redhat.com \
--to=rpeterso@redhat.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).