linux-stable/security/smack
Rohit 1a5b472bde 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>
2014-10-31 14:29:32 -07:00
..
Kconfig Smack: Bring-up access mode 2014-08-28 13:11:56 -07:00
Makefile Smack: Simplified Mandatory Access Control Kernel 2008-02-05 09:44:20 -08:00
smack.h Make Smack operate on smack_known struct where it still used char* 2014-08-29 10:10:55 -07:00
smack_access.c Smack: Lock mode for the floor and hat labels 2014-10-28 08:22:40 -07:00
smack_lsm.c Security: smack: replace kzalloc with kmem_cache for inode_smack 2014-10-31 14:29:32 -07:00
smackfs.c Make Smack operate on smack_known struct where it still used char* 2014-08-29 10:10:55 -07:00