All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: "Paul E. McKenney" <paulmck@linux.ibm.com>
Subject: data dependency naming inconsistency
Date: Mon, 11 Oct 2021 07:07:08 -0400	[thread overview]
Message-ID: <20211011064233-mutt-send-email-mst@kernel.org> (raw)

Hello Paul, all!
I've been reading with interest Paul's posts about Rust interactions with LKMM
https://paulmck.livejournal.com/63316.html
and in particular it states:
		A data dependency involves a load whose return value directly or
	indirectly determine the value stored by a later store, which results in
	the load being ordered before the store.

This matches the perf book:
	A data dependency occurs when the value returned by
	a load instruction is used to compute the data stored by
	a later store instruction.

however, memory-barriers.txt states:

     A data dependency barrier is a partial ordering on interdependent loads
     only; it is not required to have any effect on stores, independent loads
     or overlapping loads.

It also says:
	A data-dependency barrier is not required to order dependent writes
	because the CPUs that the Linux kernel supports don't do writes
	until they are certain (1) that the write will actually happen, (2)
	of the location of the write, and (3) of the value to be written.

so the result it the same: writes are ordered without a barrier,
reads are ordered by a barrier.

However, it would seem that a bit more consistency in naming won't
hurt.

Thanks,

-- 
MST


             reply	other threads:[~2021-10-11 11:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-11 11:07 Michael S. Tsirkin [this message]
2021-10-14  4:43 ` data dependency naming inconsistency Akira Yokosawa
2021-10-14  5:37   ` Michael S. Tsirkin
2021-10-14 14:29     ` Akira Yokosawa
2021-10-14 16:06       ` Michael S. Tsirkin
2021-10-14 22:48       ` Akira Yokosawa
2021-10-14 23:06         ` 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:
  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=20211011064233-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.ibm.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.