From: "yangx.jy@fujitsu.com" <yangx.jy@fujitsu.com>
To: Jason Gunthorpe <jgg@nvidia.com>, Tom Talpey <tom@talpey.com>
Cc: "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"yanjun.zhu@linux.dev" <yanjun.zhu@linux.dev>,
"rpearsonhpe@gmail.com" <rpearsonhpe@gmail.com>,
"y-goto@fujitsu.com" <y-goto@fujitsu.com>,
"lizhijian@fujitsu.com" <lizhijian@fujitsu.com>,
"tomasz.gromadzki@intel.com" <tomasz.gromadzki@intel.com>
Subject: Re: [RFC PATCH 2/2] RDMA/rxe: Add RDMA Atomic Write operation
Date: Fri, 7 Jan 2022 02:15:25 +0000 [thread overview]
Message-ID: <61D7A23B.40905@fujitsu.com> (raw)
In-Reply-To: <20220106130038.GB2328285@nvidia.com>
On 2022/1/6 21:00, Jason Gunthorpe wrote:
> On Thu, Jan 06, 2022 at 10:52:47AM +0000, yangx.jy@fujitsu.com wrote:
>> On 2022/1/6 7:53, Jason Gunthorpe wrote:
>>> On Thu, Dec 30, 2021 at 04:39:01PM -0500, Tom Talpey wrote:
>>>
>>>> Because RXE is a software provider, I believe the most natural approach
>>>> here is to use an atomic64_set(dst, *src).
>>> A smp_store_release() is most likely sufficient.
>> Hi Jason, Tom
>>
>> Is smp_store_mb() better here? It calls WRITE_ONCE + smb_mb/barrier().
>> I think the semantics of 'atomic write' is to do atomic write and make
>> the 8-byte data reach the memory.
> No, it is not 'data reach memory' it is a 'release' in that if the CPU
> later does an 'acquire' on the written data it is guarenteed to see
> all the preceeding writes.
Hi Jason, Tom
Sorry for the wrong statement. I mean that the semantics of 'atomic
write' is to write an 8-byte value atomically and make the 8-byte value
visible for all CPUs.
'smp_store_release' makes all the preceding writes visible for all CPUs
before doing an atomic write. I think this guarantee should be done by
the preceding 'flush'.
'smp_store_mb' does an atomic write and then makes the atomic write
visible for all CPUs. Subsequent 'flush' is only used to make the atomic
write persistent.
Please correct me if my understand is wrong.
Best Regards,
Xiao Yang
> Memory barriers are always paired with read and write, it is important
> to understand what the read half of the pair is.
>
> Jason
next prev parent reply other threads:[~2022-01-07 2:15 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-30 12:14 [RFC PATCH 0/2] RDMA/rxe: Add RDMA Atomic Write operation Xiao Yang
2021-12-30 12:14 ` [RFC PATCH 1/2] RDMA/rxe: Rename send_atomic_ack() and atomic member of struct resp_res Xiao Yang
2021-12-30 12:14 ` [RFC PATCH 2/2] RDMA/rxe: Add RDMA Atomic Write operation Xiao Yang
2021-12-30 21:39 ` Tom Talpey
2021-12-31 8:29 ` yangx.jy
2021-12-31 15:09 ` Tom Talpey
[not found] ` <61D563B4.2070106@fujitsu.com>
2022-01-07 15:50 ` Tom Talpey
2022-01-07 17:11 ` Jason Gunthorpe
2022-01-12 9:24 ` yangx.jy
2022-01-05 23:53 ` Jason Gunthorpe
2022-01-06 10:52 ` yangx.jy
2022-01-06 13:00 ` Jason Gunthorpe
2022-01-07 2:15 ` yangx.jy [this message]
2022-01-07 12:22 ` Jason Gunthorpe
2022-01-07 15:38 ` Tom Talpey
2022-01-07 19:28 ` Jason Gunthorpe
2022-01-07 20:11 ` Tom Talpey
2021-12-31 3:01 ` lizhijian
2021-12-31 6:02 ` yangx.jy
2021-12-30 19:21 ` [RFC PATCH 0/2] " Gromadzki, Tomasz
2021-12-30 21:42 ` Tom Talpey
2021-12-31 6:30 ` yangx.jy
2022-01-04 9:28 ` yangx.jy
2022-01-04 15:17 ` Tom Talpey
2022-01-05 1:00 ` yangx.jy
2022-01-06 0:01 ` Jason Gunthorpe
2022-01-06 1:54 ` yangx.jy
2022-01-10 15:42 ` Jason Gunthorpe
2022-01-11 2:34 ` yangx.jy
2022-01-11 23:29 ` Jason Gunthorpe
2022-02-11 13:18 ` Gromadzki, Tomasz
2022-02-17 3:50 ` yangx.jy
2022-02-19 10:37 ` Leon Romanovsky
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=61D7A23B.40905@fujitsu.com \
--to=yangx.jy@fujitsu.com \
--cc=jgg@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=lizhijian@fujitsu.com \
--cc=rpearsonhpe@gmail.com \
--cc=tom@talpey.com \
--cc=tomasz.gromadzki@intel.com \
--cc=y-goto@fujitsu.com \
--cc=yanjun.zhu@linux.dev \
/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).