diff options
author | Rohit <rohit.kr@samsung.com> | 2014-10-15 17:40:41 +0530 |
---|---|---|
committer | Casey Schaufler <casey@schaufler-ca.com> | 2014-10-31 14:29:32 -0700 |
commit | 1a5b472bde752783e0a31b59c61c9ff5b37a0983 (patch) | |
tree | 0f2a62d8c5ba00f599b0d816755698490e8276f5 /arch/ia64/lib | |
parent | 6c892df2686c5611979792aaa4ddea9ee9f18749 (diff) | |
download | linux-1a5b472bde752783e0a31b59c61c9ff5b37a0983.tar.gz linux-1a5b472bde752783e0a31b59c61c9ff5b37a0983.tar.bz2 linux-1a5b472bde752783e0a31b59c61c9ff5b37a0983.zip |
Security: smack: replace kzalloc with kmem_cache for inode_smack
The patch use kmem_cache to allocate/free inode_smack since they are
alloced in high volumes making it a perfect case for kmem_cache.
As per analysis, 24 bytes of memory is wasted per allocation due
to internal fragmentation. With kmem_cache, this can be avoided.
Accounting of memory allocation is below :
total slack net count-alloc/free caller
Before (with kzalloc)
1919872 719952 1919872 29998/0 new_inode_smack+0x14
After (with kmem_cache)
1201680 0 1201680 30042/0 new_inode_smack+0x18
>From above data, we found that 719952 bytes(~700 KB) of memory is
saved on allocation of 29998 smack inodes.
Signed-off-by: Rohit <rohit.kr@samsung.com>
Diffstat (limited to 'arch/ia64/lib')
0 files changed, 0 insertions, 0 deletions