All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Jamie Lokier <jamie@shareable.org>
Cc: Hugh Dickins <hughd@google.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Rik van Riel <riel@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Nick Piggin <npiggin@kernel.dk>,
	Andrea Arcangeli <aarcange@redhat.com>,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [RFC] page-table walkers vs memory order
Date: Mon, 30 Jul 2012 13:28:57 -0700	[thread overview]
Message-ID: <20120730202857.GL2391@linux.vnet.ibm.com> (raw)
In-Reply-To: <20120730192140.GU25459@jl-vm1.vm.bytemark.co.uk>

On Mon, Jul 30, 2012 at 08:21:40PM +0100, Jamie Lokier wrote:
> Paul E. McKenney wrote:
> > > Does some version of gcc, under the options which we insist upon,
> > > make such optimizations on any of the architectures which we support?
> > 
> > Pretty much any production-quality compiler will do double-fetch
> > and old-value-reuse optimizations, the former especially on 32-bit
> > x86.  I don't know of any production-quality compilers that do value
> > speculation, which would make the compiler act like DEC Alpha hardware,
> > and I would hope that if this does appear, (1) we would have warning
> > and (2) it could be turned off.  But there has been a lot of work on
> > this topic, so we would be foolish to rule it out.
> 
> GCC documentation for IA-64:
> 
>    -msched-ar-data-spec
>    -mno-sched-ar-data-spec
>      (En/Dis)able data speculative scheduling after reload. This results
>      in generation of ld.a instructions and the corresponding check
>      instructions (ld.c / chk.a). The default is 'enable'.
> 
> I don't know if that results in value speculation of the relevant kind.

If I remember correctly, the chk.a instruction will detect failed
speculation via cache state and deal with the situation correctly,
but I really need to defer to someone with more recent IA-64 experience.

							Thanx, Paul

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Jamie Lokier <jamie@shareable.org>
Cc: Hugh Dickins <hughd@google.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Rik van Riel <riel@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Nick Piggin <npiggin@kernel.dk>,
	Andrea Arcangeli <aarcange@redhat.com>,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [RFC] page-table walkers vs memory order
Date: Mon, 30 Jul 2012 13:28:57 -0700	[thread overview]
Message-ID: <20120730202857.GL2391@linux.vnet.ibm.com> (raw)
Message-ID: <20120730202857.2-AEAUdeUsZgjsWdzLR5hUSaDq6V8rLX4CvziwrosPU@z> (raw)
In-Reply-To: <20120730192140.GU25459@jl-vm1.vm.bytemark.co.uk>

On Mon, Jul 30, 2012 at 08:21:40PM +0100, Jamie Lokier wrote:
> Paul E. McKenney wrote:
> > > Does some version of gcc, under the options which we insist upon,
> > > make such optimizations on any of the architectures which we support?
> > 
> > Pretty much any production-quality compiler will do double-fetch
> > and old-value-reuse optimizations, the former especially on 32-bit
> > x86.  I don't know of any production-quality compilers that do value
> > speculation, which would make the compiler act like DEC Alpha hardware,
> > and I would hope that if this does appear, (1) we would have warning
> > and (2) it could be turned off.  But there has been a lot of work on
> > this topic, so we would be foolish to rule it out.
> 
> GCC documentation for IA-64:
> 
>    -msched-ar-data-spec
>    -mno-sched-ar-data-spec
>      (En/Dis)able data speculative scheduling after reload. This results
>      in generation of ld.a instructions and the corresponding check
>      instructions (ld.c / chk.a). The default is 'enable'.
> 
> I don't know if that results in value speculation of the relevant kind.

If I remember correctly, the chk.a instruction will detect failed
speculation via cache state and deal with the situation correctly,
but I really need to defer to someone with more recent IA-64 experience.

							Thanx, Paul


  reply	other threads:[~2012-07-30 20:28 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-23 17:34 [RFC] page-table walkers vs memory order Peter Zijlstra
2012-07-23 17:34 ` Peter Zijlstra
2012-07-23 19:27 ` Paul E. McKenney
2012-07-23 19:27   ` Paul E. McKenney
2012-07-24 21:51 ` Hugh Dickins
2012-07-24 21:51   ` Hugh Dickins
2012-07-25 17:56   ` Paul E. McKenney
2012-07-25 17:56     ` Paul E. McKenney
2012-07-25 20:26     ` Hugh Dickins
2012-07-25 20:26       ` Hugh Dickins
2012-07-25 21:12       ` Paul E. McKenney
2012-07-25 21:12         ` Paul E. McKenney
2012-07-25 22:09         ` Hugh Dickins
2012-07-25 22:09           ` Hugh Dickins
2012-07-25 22:37           ` Paul E. McKenney
2012-07-25 22:37             ` Paul E. McKenney
2012-07-26  8:11           ` Peter Zijlstra
2012-07-26  8:11             ` Peter Zijlstra
2012-07-30 19:21         ` Jamie Lokier
2012-07-30 19:21           ` Jamie Lokier
2012-07-30 20:28           ` Paul E. McKenney [this message]
2012-07-30 20:28             ` Paul E. McKenney
2012-07-26 20:39   ` Peter Zijlstra
2012-07-26 20:39     ` Peter Zijlstra
2012-07-27 19:22     ` Hugh Dickins
2012-07-27 19:22       ` Hugh Dickins
2012-07-27 19:39       ` Paul E. McKenney
2012-07-27 19:39         ` Paul E. McKenney
2012-08-04 14:37   ` Andrea Arcangeli
2012-08-04 14:37     ` Andrea Arcangeli
2012-08-04 22:02     ` Paul E. McKenney
2012-08-04 22:02       ` Paul E. McKenney
2012-08-04 22:47       ` Andrea Arcangeli
2012-08-04 22:47         ` Andrea Arcangeli
2012-08-04 22:59         ` Dr. David Alan Gilbert
2012-08-04 22:59           ` Dr. David Alan Gilbert
2012-08-04 23:11           ` Paul E. McKenney
2012-08-04 23:11             ` Paul E. McKenney
2012-08-05  0:10             ` Dr. David Alan Gilbert
2012-08-05  0:10               ` Dr. David Alan Gilbert
2012-08-04 23:06         ` Paul E. McKenney
2012-08-04 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=20120730202857.GL2391@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=jamie@shareable.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@kernel.dk \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.com \
    --cc=torvalds@linux-foundation.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 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.