summaryrefslogtreecommitdiffstats
path: root/include/asm-generic/xor.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-20 03:59:47 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-20 03:59:47 +0200
commit044aea9b83614948c98564000db07d1d32b2d29b (patch)
treeb1f13ed2f4bb0bd40f7915a89aafaf449b6145cd /include/asm-generic/xor.h
parentMerge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/... (diff)
downloadlinux-044aea9b83614948c98564000db07d1d32b2d29b.tar.xz
linux-044aea9b83614948c98564000db07d1d32b2d29b.zip
selinux: de-crapify avc cache stat code generation
You can turn off the avc cache stats, but distributions seem to not do that (perhaps because several performance tuning how-to's talk about the avc cache statistics). Which is sad, because the code it generates is truly horrendous, with the statistics update being sandwitched between get_cpu/put_cpu which in turn causes preemption disables etc. We're talking ten+ instructions just to increment a per-cpu variable in some pretty hot code. Fix the craziness by just using 'this_cpu_inc()' instead. Suddenly we only need a single 'inc' instruction to increment the statistics. This is quite noticeable in the incredibly hot avc_has_perm_noaudit() function (which triggers all the statistics by virtue of doing an avc_lookup() call). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-generic/xor.h')
0 files changed, 0 insertions, 0 deletions