SELinux: convert the avc cache hash list to an hlist
authorEric Paris <eparis@redhat.com>
Thu, 12 Feb 2009 19:51:04 +0000 (14:51 -0500)
committerJames Morris <jmorris@namei.org>
Fri, 13 Feb 2009 22:23:48 +0000 (09:23 +1100)
We do not need O(1) access to the tail of the avc cache lists and so we are
wasting lots of space using struct list_head instead of struct hlist_head.
This patch converts the avc cache to use hlists in which there is a single
pointer from the head which saves us about 4k of global memory.

Resulted in about a 1.5% decrease in time spent in avc_has_perm_noaudit based
on oprofile sampling of tbench.  Although likely within the noise....

Signed-off-by: Eric Paris <eparis@redhat.com>
Reviewed-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: James Morris <jmorris@namei.org>

No differences found