Skip to content
Commit 3232c110 authored by Yuichi Nakamura's avatar Yuichi Nakamura Committed by James Morris
Browse files

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: default avatarYuichi <Nakamura&lt;ynakam@hitachisoft.jp>
Acked-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: default avatarJames Morris <jmorris@namei.org>
parent 821f3eff
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment