lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 6 Feb 2019 08:35:54 -0800
From:   Tejun Heo <tj@...nel.org>
To:     Ayush Mittal <ayush.m@...sung.com>
Cc:     gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
        pankaj.m@...sung.com, a.sahrawat@...sung.com, v.narang@...sung.com
Subject: Re: [PATCH v2] kernfs: Allocating memory for kernfs_iattrs with
 kmem_cache.

On Wed, Feb 06, 2019 at 10:25:42AM +0530, Ayush Mittal wrote:
> Creating a new cache for kernfs_iattrs.
> Currently, memory is allocated with kzalloc() which
> always gives aligned memory. On ARM, this is 64 byte aligned.
> To avoid the wastage of memory in aligning the size requested,
> a new cache for kernfs_iattrs is created.
> 
> Size of struct kernfs_iattrs is 80 Bytes.
> On ARM, it will come in kmalloc-128 slab.
> and it will come in kmalloc-192 slab if debug info is enabled.
> Extra bytes taken 48 bytes.
> 
> Total number of objects created : 4096
> Total saving = 48*4096 = 192 KB
> 
> After creating new slab(When debug info is enabled) :
> sh-3.2# cat /proc/slabinfo
> ...
> kernfs_iattrs_cache   4069   4096    128   32    1 : tunables    0    0    0 : slabdata    128    128      0
> ...
> 
> All testing has been done on ARM target.
> 
> Signed-off-by: Ayush Mittal <ayush.m@...sung.com>
> Signed-off-by: Vaneet Narang <v.narang@...sung.com>

Acked-by: Tejun Heo <tj@...nel.org>

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ