From: Yuichi Nakamura Date: Fri, 24 Aug 2007 02:55:11 +0000 (+0900) Subject: SELinux: tune avtab to reduce memory usage X-Git-Tag: v2.6.24-rc1~824^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3232c110b56bd01c5f0fdfd16b4d695f2e05b0a9;p=pandora-kernel.git SELinux: tune avtab to reduce memory usage This patch reduces memory usage of SELinux by tuning avtab. Number of hash slots in avtab was 32768. Unused slots used memory when number of rules is fewer. This patch decides number of hash slots dynamically based on number of rules. (chain length)^2 is also printed out in avtab_hash_eval to see standard deviation of avtab hash table. Signed-off-by: Yuichi Nakamura Acked-by: Stephen Smalley Signed-off-by: James Morris --- Reading git-diff-tree failed