From: Alan Huang <mmpgouride@gmail.com>
To: Eric Dumazet <edumazet@google.com>
Cc: paulmck@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] list: Remove unnecessary WRITE_ONCE()
Date: Mon, 19 Jun 2023 19:39:04 +0800 [thread overview]
Message-ID: <4E6A0BCB-02F4-4AB9-BE56-7FC7C15A6B2C@gmail.com> (raw)
In-Reply-To: <CANn89iJgM1-SBzHXDdur+MgK2cBBeOacKOWz=zPyEa2mee3fOw@mail.gmail.com>
> 2023年6月19日 19:02,Eric Dumazet <edumazet@google.com> 写道:
>
> On Mon, Jun 19, 2023 at 11:03 AM Alan Huang <mmpgouride@gmail.com> wrote:
>>
>> Commit c54a2744497d("list: Add hlist_unhashed_lockless()") added
>> various WRITE_ONCE() to pair with the READ_ONCE() in
>> hlist_unhashed_lockless(), but there is no need to protect
>> ->next with WRITE_ONCE(). Therefore, this commit removes those
>> unnecessary WRITE_ONCE().
>
> Why are they unnecessary ?
There is no reader locklessly read ->next.
These functions are protected by something like spin_lock, only the thread running
the function can access ->next.
> They seem just fine to me.
> Please elaborate.
next prev parent reply other threads:[~2023-06-19 11:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-19 9:03 Alan Huang
2023-06-19 11:02 ` Eric Dumazet
2023-06-19 11:39 ` Alan Huang [this message]
2023-06-21 12:12 ` Alan Huang
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=4E6A0BCB-02F4-4AB9-BE56-7FC7C15A6B2C@gmail.com \
--to=mmpgouride@gmail.com \
--cc=edumazet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
/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®