All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Shi <alex.shi@intel.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: cl@linux-foundation.org, Peter Zijlstra <a.p.zijlstra@chello.nl>,
	mgorman@suse.de, Andrew Morton <akpm@linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-mm@vger.kernel.org, Andi Kleen <ak@linux.intel.com>
Subject: unnecessary tlb flush in mprotect
Date: Mon, 21 May 2012 16:30:21 +0800	[thread overview]
Message-ID: <4FB9FD1D.6000001@intel.com> (raw)

when mprotect just change prots of non-present pages, current mprotect
still do the tlb flush in check_protection().
but according to 4.10.2.3 Intel SDM V3A (
www.intel.com/Assets/ja_JP/PDF/manual/253668.pdf ) at that time, TLB has
no this lines for this page. So, tlb flush is just waste time. (for cr3
rewrite, flush all tlb, or invlpg, like a 'nop' in intel cpu)

Do we need to add the pte_present similar check here to prevent the
unnecessary tlb flushing? I mean, are there real case in word, User like
to change page prots before assign a physical page to it?



Alex Shi

             reply	other threads:[~2012-05-21  8:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-21  8:30 Alex Shi [this message]
2012-05-22  1:08 ` unnecessary tlb flush in mprotect Alex Shi
2012-05-22 16:37   ` Andi Kleen
2012-05-23  0:06     ` Alex Shi
2012-05-26 18:46       ` Hugh Dickins

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=4FB9FD1D.6000001@intel.com \
    --to=alex.shi@intel.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@vger.kernel.org \
    --cc=mgorman@suse.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 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.