summaryrefslogtreecommitdiffstats
path: root/COPYING
diff options
context:
space:
mode:
authorDave Hansen <dave.hansen@linux.intel.com>2015-01-08 14:30:21 -0800
committerThomas Gleixner <tglx@linutronix.de>2015-01-22 21:11:06 +0100
commitc922228efeeefa32e57f875764bfa6ca8053a68a (patch)
treef41350c7039ba727711d4edc2bae50d8ab8212d7 /COPYING
parent814564a0a1d2faee11ff9de43245d78cb79c85ac (diff)
downloadlinux-c922228efeeefa32e57f875764bfa6ca8053a68a.tar.gz
linux-c922228efeeefa32e57f875764bfa6ca8053a68a.tar.bz2
linux-c922228efeeefa32e57f875764bfa6ca8053a68a.zip
x86, mpx: Fix potential performance issue on unmaps
The 3.19 merge window saw some TLB modifications merged which caused a performance regression. They were fixed in commit 045bbb9fa. Once that fix was applied, I also noticed that there was a small but intermittent regression still present. It was not present consistently enough to bisect reliably, but I'm fairly confident that it came from (my own) MPX patches. The source was reading a relatively unused field in the mm_struct via arch_unmap. I also noted that this code was in the main instruction flow of do_munmap() and probably had more icache impact than we want. This patch does two things: 1. Adds a static (via Kconfig) and dynamic (via cpuid) check for MPX with cpu_feature_enabled(). This keeps us from reading that cacheline in the mm and trades it for a check of the global CPUID variables at least on CPUs without MPX. 2. Adds an unlikely() to ensure that the MPX call ends up out of the main instruction flow in do_munmap(). I've added a detailed comment about why this was done and why we want it even on systems where MPX is present. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Cc: luto@amacapital.net Cc: Dave Hansen <dave@sr71.net> Link: http://lkml.kernel.org/r/20150108223021.AEEAB987@viggo.jf.intel.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions