Historical speck list archives
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: speck@linutronix.de
Subject: [MODERATED] Re: [PATCH 2/4] RFC-MDSv1 0
Date: Sun, 9 Dec 2018 18:12:52 +0000	[thread overview]
Message-ID: <193b9590-6f56-4b96-6dcc-d003548aa1c7@citrix.com> (raw)
In-Reply-To: <20181114040429.GL6218@tassilo.jf.intel.com>

On 14/11/2018 04:04, speck for Andi Kleen wrote:
>> I was under the impression that the recommendation to use a NUL selector
>> was specifically to avoid this second read.
> No the rationale for the recommendation is to avoid mispredictions 
> in the microcode. But the two are equivalent.

After a discussion with Jason where (again) he suggested the use of %ds
rather than NUL, I went back and extended my micro-benchmark.

All other things being equal and cache-hot, a VERW of %ds really is
faster NUL.  (Net execution time is about 2/3 as long as recorded by two
rdtscp's, not accounting for any systematic timing errors).  This is
just against some of my development boxes - I'm still waiting on the
correct CPU to use the prototype microcode with additional VERW goodies.

Either way - I'm surprised by these results, but %ds does looks to be
the quickest option.  Apologies for the noise on this thread.

~Andrew

  reply	other threads:[~2018-12-09 21:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12  3:41 [MODERATED] [PATCH 0/4] RFC-MDSv1 1 Andi Kleen
2018-11-12  3:41 ` [MODERATED] [PATCH 1/4] RFC-MDSv1 4 Andi Kleen
2018-11-12  3:41 ` [MODERATED] [PATCH 2/4] RFC-MDSv1 0 Andi Kleen
2018-11-13  0:07   ` [MODERATED] " Andrew Cooper
2018-11-13  1:35     ` Andi Kleen
2018-11-13 21:59       ` Andrew Cooper
2018-11-14  4:04         ` Andi Kleen
2018-12-09 18:12           ` Andrew Cooper [this message]
2018-11-13 20:47   ` Jiri Kosina
2018-11-13 21:04     ` Luck, Tony
2018-11-14  2:32     ` Andi Kleen
2018-11-12  3:41 ` [MODERATED] [PATCH 3/4] RFC-MDSv1 3 Andi Kleen
2018-11-12  3:41 ` [MODERATED] [PATCH 4/4] RFC-MDSv1 2 Andi Kleen
2018-11-12 22:36   ` [MODERATED] " Greg KH
2018-11-13  1:37     ` Andi Kleen

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=193b9590-6f56-4b96-6dcc-d003548aa1c7@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=speck@linutronix.de \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).