unnecessary tlb flush in mprotect

From: Alex Shi
Date: Mon May 21 2012 - 04:31:53 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/