All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Jason Gunthorpe' <jgg@nvidia.com>
Cc: 'Chuck Lever III' <chuck.lever@oracle.com>,
	Christoph Hellwig <hch@lst.de>, Leon Romanovsky <leon@kernel.org>,
	Doug Ledford <dledford@redhat.com>,
	Avihai Horon <avihaih@nvidia.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	Bart Van Assche <bvanassche@acm.org>, Tom Talpey <tom@talpey.com>,
	Santosh Shilimkar <santosh.shilimkar@oracle.com>,
	Keith Busch <kbusch@kernel.org>, Honggang LI <honli@redhat.com>,
	Max Gurtovoy <mgurtovoy@nvidia.com>
Subject: RE: [PATCH v2 rdma-next] RDMA/mlx5: Enable Relaxed Ordering by default for kernel ULPs
Date: Wed, 9 Jun 2021 15:48:27 +0000	[thread overview]
Message-ID: <1a3512e2891642a193004ee4450a11dd@AcuMS.aculab.com> (raw)
In-Reply-To: <20210609150922.GA1109697@nvidia.com>

From: Jason Gunthorpe
> Sent: 09 June 2021 16:09
> 
> On Wed, Jun 09, 2021 at 03:05:52PM +0000, David Laight wrote:
> 
> > In principle some writel() could generate PCIe write TLP (going
> > to the target) that have the 'relaxed ordering' bit set.
> 
> In Linux we call this writel_relaxed(), though I know of no
> implementation that sets the RO bit in the TLP based on this, it would
> be semantically correct to do so.
> 
> writel() has strong order requirements and must not generate a RO TLP.

Somewhere I'd forgotten about that :-(
It usually just allows the compiler and cpu hardware re-sequence
the bus cycles.

OTOH I doubt any/many PCIe targets have 'memory' areas that would
benefit from RO write TLP.
Especially since everything is organised to use target issued buffer
copies.

I'm guessing that the benefits from RO are when the writes hit memory
that is on a NUMA node or 'differently cached'.
So writes to once cache line can proceed while earlier writes are
still waiting for the cache-coherency protocol.

From what I've seen writel() aren't too bad - they are async.
The real problem is readl().
The x86 cpu I have use a separate TLP id (I've forgotten the correct
term) for each cpu core.
So while multiple cpu can (and do) issue concurrent reads, reads from
a single cpu happen one TLP at a time - even though it would be legitimate
for the out-of-order execution unit to issue additional read TLP.
There are times when you really do have to do PIO buffer reads :-(

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


  reply	other threads:[~2021-06-09 15:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-09 11:05 [PATCH v2 rdma-next] RDMA/mlx5: Enable Relaxed Ordering by default for kernel ULPs Leon Romanovsky
2021-06-09 12:52 ` Christoph Hellwig
2021-06-09 13:53   ` Leon Romanovsky
2021-06-09 13:59     ` Christoph Hellwig
2021-06-10  7:44       ` Leon Romanovsky
2021-06-09 14:10   ` David Laight
2021-06-09 14:37     ` Chuck Lever III
2021-06-09 15:05       ` David Laight
2021-06-09 15:09         ` Jason Gunthorpe
2021-06-09 15:48           ` David Laight [this message]
2021-06-21 18:02 ` Jason Gunthorpe
2021-06-21 20:20   ` Christoph Hellwig
2021-06-21 23:18     ` Jason Gunthorpe
2021-06-22  6:20       ` Leon Romanovsky
2021-06-23 23:06 ` Max Gurtovoy
2021-06-24  6:38   ` Leon Romanovsky
2021-06-24  7:39     ` Max Gurtovoy
2021-06-24 11:36       ` Jason Gunthorpe
2021-06-27  7:32         ` Leon Romanovsky
2021-06-27  7:30       ` 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=1a3512e2891642a193004ee4450a11dd@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=avihaih@nvidia.com \
    --cc=bvanassche@acm.org \
    --cc=chuck.lever@oracle.com \
    --cc=dledford@redhat.com \
    --cc=hch@lst.de \
    --cc=honli@redhat.com \
    --cc=jgg@nvidia.com \
    --cc=kbusch@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mgurtovoy@nvidia.com \
    --cc=santosh.shilimkar@oracle.com \
    --cc=tom@talpey.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.