From: Omar Sandoval <osandov@osandov.com>
To: Muchun Song <muchun.song@linux.dev>
Cc: Jens Axboe <axboe@kernel.dk>,
Muchun Song <songmuchun@bytedance.com>,
josef@toxicpanda.com, oleg@redhat.com,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] block: remove redundant explicit memory barrier from rq_qos waiter and waker
Date: Tue, 22 Oct 2024 12:59:25 -0700 [thread overview]
Message-ID: <ZxgEHW0UuuLcSY7_@telecaster.dhcp.thefacebook.com> (raw)
In-Reply-To: <7C429559-E91C-4732-901B-0D49C2D083F7@linux.dev>
On Tue, Oct 22, 2024 at 02:31:53PM +0800, Muchun Song wrote:
>
>
> > On Oct 21, 2024, at 21:45, Jens Axboe <axboe@kernel.dk> wrote:
> >
> > On 10/21/24 2:52 AM, Muchun Song wrote:
> >> The memory barriers in list_del_init_careful() and list_empty_careful()
> >> in pairs already handle the proper ordering between data.got_token
> >> and data.wq.entry. So remove the redundant explicit barriers. And also
> >> change a "break" statement to "return" to avoid redundant calling of
> >> finish_wait().
> >
> > Not sure why you didn't CC Omar on this one, as he literally just last
> > week fixed an issue related to this.
>
> Hi Jens,
>
> Yes. I only CC the author of patch of adding the barriers, I thought
> they should be more confident about this. Thanks for your reminder.
> I saw Omar's great fix. And thanks for you help me CC Omar. I think
> he'll be also suitable for commenting on this patch.
>
> Muchun,
> Thanks.
Well there goes my streak of not reading memory-barriers.txt for a few
months...
This looks fine to me. wake_up_process() also implies a full memory
barrier, so I that smp_wmb() was extra redundant.
Reviewed-by: Omar Sandoval <osandov@fb.com>
next prev parent reply other threads:[~2024-10-22 19:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-21 8:52 Muchun Song
2024-10-21 13:45 ` Jens Axboe
2024-10-22 6:31 ` Muchun Song
2024-10-22 19:59 ` Omar Sandoval [this message]
2024-10-22 7:53 ` Chengming Zhou
2024-10-22 8:02 ` Muchun Song
2024-10-22 22:25 ` Jens Axboe
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=ZxgEHW0UuuLcSY7_@telecaster.dhcp.thefacebook.com \
--to=osandov@osandov.com \
--cc=axboe@kernel.dk \
--cc=josef@toxicpanda.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=muchun.song@linux.dev \
--cc=oleg@redhat.com \
--cc=songmuchun@bytedance.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
all inboxes | Powered by JetHome®