From: Liran Alon <liran.alon@oracle.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: "Will Deacon" <will@kernel.org>,
saeedm@mellanox.com, leon@kernel.org, netdev@vger.kernel.org,
linux-rdma@vger.kernel.org, eli@mellanox.com,
tariqt@mellanox.com, danielm@mellanox.com,
"Håkon Bugge" <haakon.bugge@oracle.com>
Subject: Re: [PATCH] net: mlx5: Use writeX() to ring doorbell and remove reduntant wmb()
Date: Fri, 3 Jan 2020 18:42:59 +0200 [thread overview]
Message-ID: <EFADA53B-CB84-44E2-922B-83C505D4AE8B@oracle.com> (raw)
In-Reply-To: <20200103163606.GC9706@ziepe.ca>
> On 3 Jan 2020, at 18:36, Jason Gunthorpe <jgg@ziepe.ca> wrote:
>
> On Fri, Jan 03, 2020 at 06:31:18PM +0200, Liran Alon wrote:
>
>>> I am surprised that AMD is different here, the evolution of the WC
>>> feature on x86 was to transparently speed up graphics, so I'm pretty
>>> surprised AMD can get away with not ordering the same as Intel..
>>
>> Completely agree. I was very surprised to see this from AMD SDM and
>> Optimization Guide SDM. It made sense to me too that graphics frame
>> buffer is written to WC memory and then is committed to GPU by
>> writing to some doorbell register mapped as UC memory.
>
> It is possible this manual is wrong or misleading?
>
> Having WC writes not strongly order after UC writes to the same
> device, on x86, seems very, very surprising to me. Everything is
> ordered on x86 :)
>
> Jason
I thought so the same at first. This is why I checked both AMD SDM and AMD Optimisation Guide
and made sure to quote relevant section this document. I will be glad to be corrected that’s solely
a mistake. But it seems very intentional and explicitly documented in multiple places.
Also note that WC memory is considered weakly-ordered in x86. E.g. non-temporal stores that
appear in program order after a previous store to WB memory, can complete before the store to
WB memory. In addition, a store to WC memory is considered complete once the stored data reach
the WC buffer, where it’s not globally visible. In contrast to stores to WB/UC memory that are globally
visible once they are complete (In contrast to retired).
But again, I agree this is very surprising and unexpected… To have a single arch have different caching
behaviour that needs to be considered based on CPU vendor...
-Liran
next prev parent reply other threads:[~2020-01-03 16:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-02 17:44 [PATCH] net: mlx5: Use writeX() to ring doorbell and remove reduntant wmb() Liran Alon
2020-01-02 19:29 ` Jason Gunthorpe
2020-01-02 19:45 ` Liran Alon
2020-01-02 20:58 ` Jason Gunthorpe
2020-01-02 22:21 ` Liran Alon
2020-01-03 13:37 ` Jason Gunthorpe
2020-01-03 16:31 ` Liran Alon
2020-01-03 16:36 ` Jason Gunthorpe
2020-01-03 16:42 ` Liran Alon [this message]
2020-01-03 18:38 ` Liran Alon
2020-01-03 19:06 ` Jason Gunthorpe
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=EFADA53B-CB84-44E2-922B-83C505D4AE8B@oracle.com \
--to=liran.alon@oracle.com \
--cc=danielm@mellanox.com \
--cc=eli@mellanox.com \
--cc=haakon.bugge@oracle.com \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=saeedm@mellanox.com \
--cc=tariqt@mellanox.com \
--cc=will@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