linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Andy Lutomirski <luto@kernel.org>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	"Ingo Molnar" <mingo@kernel.org>,
	"Kirill A. Shutemov" <kirill@shutemov.name>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Cyrill Gorcunov" <gorcunov@openvz.org>,
	"Kees Cook" <keescook@chromium.org>,
	"Matthew Wilcox" <willy@infradead.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Borislav Petkov" <bp@suse.de>,
	"Andy Shevchenko" <andy.shevchenko@gmail.com>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Peter Anvin" <hpa@zytor.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	"Jürgen Groß" <jgross@suse.com>,
	linux-tip-commits@vger.kernel.org,
	"Dave Hansen" <dave.hansen@intel.com>
Subject: Re: [tip:x86/mm] x86/boot/compressed/64: Describe the logic behind the LA57 check
Date: Mon, 12 Mar 2018 10:12:38 -0700	[thread overview]
Message-ID: <CA+55aFya-fZQVi45axVpv4PF_b8yhHfDxx3xCTX+gbN5Ec9VUQ@mail.gmail.com> (raw)
In-Reply-To: <CALCETrU8=_A9VzJMWuLouoyVQVLbnh_1etQK4tB4kvD8b51opQ@mail.gmail.com>

On Mon, Mar 12, 2018 at 10:06 AM, Andy Lutomirski <luto@kernel.org> wrote:
>
> I'd be surprised if there's a noticeable performance hit on anything
> except the micro-est of benchmarks.  We're talking one extra
> intermediate paging structure cache entry in use, maybe a few data
> cache lines, and (wild guess) 0 extra cycles on a TLB miss in the
> normal case.  This is because the walks are almost never going to
> start at the root.

Probably. But VM people may disagree if they already have high TLB miss costs.

> The real hit will be the extra page table for every task.

.. and it's unclear how noticeable that might be. It's not like it's
per-thread, only per process, and very few people have so many
processes that a page per process matters.

But regardless, I think we're better off with a "wait and see" approach.

IOW, try to use 5-level whenever possible for now, and _if_ somebody
actually can show that 4-level page tables perform better or have some
other advantage, we can then try to be clever later when it's all
tested and it's just an optimization, not a "that code won't even run
normally and gets basically zero coverage".

                Linus

  reply	other threads:[~2018-03-12 17:12 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-26 18:04 [PATCH 0/5] x86/boot/compressed/64: Prepare trampoline memory Kirill A. Shutemov
2018-02-26 18:04 ` [PATCH 1/5] x86/boot/compressed/64: Describe the logic behind LA57 check Kirill A. Shutemov
2018-03-12  9:27   ` [tip:x86/mm] x86/boot/compressed/64: Describe the logic behind the " tip-bot for Kirill A. Shutemov
2018-03-12 12:40     ` Peter Zijlstra
2018-03-12 12:43       ` Kirill A. Shutemov
2018-03-12 13:10         ` Peter Zijlstra
2018-03-12 14:04           ` Kirill A. Shutemov
2018-03-12 14:32             ` Ingo Molnar
2018-03-12 14:50               ` Kirill A. Shutemov
2018-03-12 16:42                 ` Linus Torvalds
2018-03-12 17:06                   ` Andy Lutomirski
2018-03-12 17:12                     ` Linus Torvalds [this message]
2018-03-12 17:41                       ` Ingo Molnar
2018-03-12 17:21                     ` Dave Hansen
2018-03-12 14:52               ` Cyrill Gorcunov
2018-02-26 18:04 ` [PATCH 2/5] x86/boot/compressed/64: Find a place for 32-bit trampoline Kirill A. Shutemov
2018-02-26 22:30   ` Borislav Petkov
2018-02-27  8:14     ` Kirill A. Shutemov
2018-03-12  9:28   ` [tip:x86/mm] " tip-bot for Kirill A. Shutemov
2018-02-26 18:04 ` [PATCH 3/5] x86/boot/compressed/64: Save and restore trampoline memory Kirill A. Shutemov
2018-03-12  9:29   ` [tip:x86/mm] " tip-bot for Kirill A. Shutemov
2018-02-26 18:04 ` [PATCH 4/5] x86/boot/compressed/64: Set up " Kirill A. Shutemov
2018-03-12  9:29   ` [tip:x86/mm] " tip-bot for Kirill A. Shutemov
2018-02-26 18:04 ` [PATCH 5/5] x86/boot/compressed/64: Prepare new top-level page table for trampoline Kirill A. Shutemov
2018-03-12  9:30   ` [tip:x86/mm] " tip-bot for Kirill A. Shutemov
2018-02-26 19:32 ` [PATCH 0/5] x86/boot/compressed/64: Prepare trampoline memory Borislav Petkov
2018-02-26 20:55   ` Kirill A. Shutemov
2018-02-27  9:32     ` 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=CA+55aFya-fZQVi45axVpv4PF_b8yhHfDxx3xCTX+gbN5Ec9VUQ@mail.gmail.com \
    --to=torvalds@linux-foundation.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=bp@suse.de \
    --cc=dave.hansen@intel.com \
    --cc=ebiederm@xmission.com \
    --cc=gorcunov@openvz.org \
    --cc=hpa@zytor.com \
    --cc=jgross@suse.com \
    --cc=keescook@chromium.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=willy@infradead.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).