archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <>
To: Peter Zijlstra <>
Cc: Hou Tao <>, Christoph Hellwig <>,
	Jens Axboe <>,
	Alexander Viro <>,,,,
Subject: Re: [PATCH] block: ensure the memory order between bi_private and bi_status
Date: Mon, 19 Jul 2021 11:09:47 -0700	[thread overview]
Message-ID: <20210719180947.GZ4397@paulmck-ThinkPad-P17-Gen-1> (raw)
In-Reply-To: <>

On Fri, Jul 16, 2021 at 12:19:29PM +0200, Peter Zijlstra wrote:
> On Fri, Jul 16, 2021 at 05:02:33PM +0800, Hou Tao wrote:
> > > Cachelines don't guarantee anything, you can get partial forwards.
> > 
> > Could you please point me to any reference ? I can not google
> > 
> > any memory order things by using "partial forwards".
> I'm not sure I have references, but there are CPUs that can do, for
> example, store forwarding at a granularity below cachelines (ie at
> register size).
> In such a case a CPU might observe the stored value before it is
> committed to memory.

There have been examples of systems with multiple hardware threads
per core, but where the hardware threads share a store buffer.
In this case, the other threads in the core might see a store before
it is committed to a cache line.

As you might imagine, the hardware implementation of memory barriers
in such a system is tricky.  But not impossible.

							Thanx, Paul

  reply	other threads:[~2021-07-19 18:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-01 11:35 [PATCH] block: ensure the memory order between bi_private and bi_status Hou Tao
2021-07-07  6:29 ` Hou Tao
2021-07-13  1:14   ` Hou Tao
2021-07-15  7:01 ` Christoph Hellwig
2021-07-15  8:13   ` Peter Zijlstra
2021-07-16  9:02     ` Hou Tao
2021-07-16 10:19       ` Peter Zijlstra
2021-07-19 18:09         ` Paul E. McKenney [this message]
2021-07-19 18:16   ` Paul E. McKenney

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210719180947.GZ4397@paulmck-ThinkPad-P17-Gen-1 \ \ \ \ \ \ \ \ \ \ \

* 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).