linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Andy Lutomirski <luto@kernel.org>, X86 ML <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Brian Gerst <brgerst@gmail.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Oleg Nesterov <oleg@redhat.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Andrey Ryabinin <aryabinin@virtuozzo.com>
Subject: Re: [PATCH v2 3/3] x86/mm: If INVPCID is available, use it to flush global mappings
Date: Fri, 29 Jan 2016 19:27:17 +0100	[thread overview]
Message-ID: <20160129182717.GA17459@pd.tnic> (raw)
In-Reply-To: <CALCETrWhUWjfdDS6eyB6PfrJLU8YvvrfkeeKFTo8moxq7L5t6A@mail.gmail.com>

On Fri, Jan 29, 2016 at 09:35:22AM -0800, Andy Lutomirski wrote:
> I'll fiddle with that benchmark a little bit.  Maybe I can make it
> suck less.  If anyone knows a good non-micro benchmark for this, let
> me know.

Yeah, I don't know of a good one. The TLB and all those intermediary
walker caches modern x86 CPUs have are really good. So it is hard to
measure any improvements there. I guess in this particular case, if one
can't measure slowdowns and the code is simple enough, then we're good
enough. In theory, we are carefully killing less TLB entries and the
related cached page walker data so that should be a good thing...

> I refuse to use dbus as my benchmark :)

Ha!

> FWIW, I benchmarked cr4 vs invpcid by adding a prctl and calling it in
> a loop.

Apparently INVPCID is faster than the two CR4 writes.

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.

  reply	other threads:[~2016-01-29 18:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-25 18:37 [PATCH v2 0/3] x86/mm: INVPCID support Andy Lutomirski
2016-01-25 18:37 ` [PATCH v2 1/3] x86/mm: Add INVPCID helpers Andy Lutomirski
2016-01-29 11:19   ` Borislav Petkov
2016-01-25 18:37 ` [PATCH v2 2/3] x86/mm: Add a noinvpcid option to turn off INVPCID Andy Lutomirski
2016-01-29 11:21   ` Borislav Petkov
2016-01-25 18:37 ` [PATCH v2 3/3] x86/mm: If INVPCID is available, use it to flush global mappings Andy Lutomirski
2016-01-29 14:26   ` Borislav Petkov
2016-01-29 17:35     ` Andy Lutomirski
2016-01-29 18:27       ` Borislav Petkov [this message]
2016-01-25 18:57 ` [PATCH v2 0/3] x86/mm: INVPCID support Ingo Molnar
2016-01-27 10:09   ` several messages Thomas Gleixner
2016-01-29 13:21     ` Borislav Petkov

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=20160129182717.GA17459@pd.tnic \
    --to=bp@alien8.de \
    --cc=aryabinin@virtuozzo.com \
    --cc=brgerst@gmail.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@amacapital.net \
    --cc=luto@kernel.org \
    --cc=oleg@redhat.com \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.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 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).