From: David Howells <dhowells@redhat.com>
To: Akira Yokosawa <akiyks@gmail.com>
Cc: dhowells@redhat.com, zilin@seu.edu.cn, jianhao.xu@seu.edu.cn,
jlayton@kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, netfs@lists.linux.dev,
mjguzik@gmail.com
Subject: Re: [PATCH] fs/netfs: Remove redundant use of smp_rmb()
Date: Sat, 07 Dec 2024 08:04:56 +0000 [thread overview]
Message-ID: <2011011.1733558696@warthog.procyon.org.uk> (raw)
In-Reply-To: <69667b21-9491-458d-9523-6c2b29e1a7e6@gmail.com>
Akira Yokosawa <akiyks@gmail.com> wrote:
> Are you sure removing the smp_rmb() is realy the right thing to do?
The wait_on_bit*() class functions, e.g.:
wait_on_bit(unsigned long *word, int bit, unsigned mode)
{
might_sleep();
if (!test_bit_acquire(bit, word))
return 0;
return out_of_line_wait_on_bit(word, bit,
bit_wait,
mode);
}
now unconditionally includes an appropriate barrier on the test_bit(), so the
smp_rmb() should be unnecessary, though netfslib should probably be using
clear_and_wake_up_bit().
Probably we need to update the doc to reflect this.
David
next prev parent reply other threads:[~2024-12-07 8:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-07 2:19 [PATCH] fs/netfs: Remove redundant use of smp_rmb() Zilin Guan
2024-12-07 5:20 ` Akira Yokosawa
2024-12-07 8:04 ` David Howells [this message]
2024-12-07 10:09 ` Akira Yokosawa
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=2011011.1733558696@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=akiyks@gmail.com \
--cc=jianhao.xu@seu.edu.cn \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjguzik@gmail.com \
--cc=netfs@lists.linux.dev \
--cc=zilin@seu.edu.cn \
/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).