public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* unnecessary tlb flush in mprotect
@ 2012-05-21  8:30 Alex Shi
  2012-05-22  1:08 ` Alex Shi
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Shi @ 2012-05-21  8:30 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: cl, Peter Zijlstra, mgorman, Andrew Morton,
	linux-kernel@vger.kernel.org, linux-mm, Andi Kleen

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-05-26 18:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-21  8:30 unnecessary tlb flush in mprotect Alex Shi
2012-05-22  1:08 ` Alex Shi
2012-05-22 16:37   ` Andi Kleen
2012-05-23  0:06     ` Alex Shi
2012-05-26 18:46       ` Hugh Dickins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox