android_kernel_samsung_msm8976/security/selinux
Linus Torvalds 044aea9b83 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>
2011-05-19 18:59:47 -07:00
..
include SELINUX: Make selinux cache VFS RCU walks safe 2011-04-25 18:16:32 -07:00
ss Merge branch 'for-linus' of git://git.infradead.org/users/eparis/selinux into for-linus 2011-05-13 09:52:16 +10:00
.gitignore
avc.c selinux: de-crapify avc cache stat code generation 2011-05-19 18:59:47 -07:00
exports.c
hooks.c Merge branch 'for-linus' of git://git.infradead.org/users/eparis/selinux into for-linus 2011-05-04 11:59:34 +10:00
Kconfig
Makefile
netif.c security,rcu: convert call_rcu(sel_netif_free) to kfree_rcu() 2011-05-07 22:51:05 -07:00
netlabel.c Fix common misspellings 2011-03-31 11:26:23 -03:00
netlink.c
netnode.c
netport.c
nlmsgtab.c
selinuxfs.c
xfrm.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2011-03-16 16:29:25 -07:00