SELinux: remove the unused ae.used
authorEric Paris <eparis@redhat.com>
Thu, 12 Feb 2009 19:50:43 +0000 (14:50 -0500)
committerJames Morris <jmorris@namei.org>
Fri, 13 Feb 2009 22:22:37 +0000 (09:22 +1100)
commit906d27d9d28fd50fb40026e56842d8f6806a7a04
tree4f73e1396a09349a307f38b1de19767f558bedb1
parenta5dda683328f99c781f92c66cc52ffc0639bef58
SELinux: remove the unused ae.used

Currently SELinux code has an atomic which was intended to track how many
times an avc entry was used and to evict entries when they haven't been
used recently.  Instead we never let this atomic get above 1 and evict when
it is first checked for eviction since it hits zero.  This is a total waste
of time so I'm completely dropping ae.used.

This change resulted in about a 3% faster avc_has_perm_noaudit when running
oprofile against a tbench benchmark.

Signed-off-by: Eric Paris <eparis@redhat.com>
Reviewed by: Paul Moore <paul.moore@hp.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
security/selinux/avc.c