Messages in this thread | | | Date | Tue, 14 Oct 2014 22:43:38 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH 1/1] Security : smack : Use kmem_cache for allocation and freeing of inode_smack |
| |
On Wed, 15 Oct 2014 11:26:16 +0530 Rohit Kumar <rohit.kr@samsung.com> wrote:
> From: Rohit <rohit.kr@samsung.com> > > Use kmem_cache to allocate/free inode_smack since they are > alloced in high volumes making it a perfect case for kmem_cache. > > 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 > > ... > > --- a/security/smack/smack_lsm.c > +++ b/security/smack/smack_lsm.c > @@ -53,6 +53,7 @@ > #define SMK_SENDING 2 > > LIST_HEAD(smk_ipv6_port_list); > +struct kmem_cache *smack_inode_cache;
static.
| |