2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-19 02:34:01 +08:00
linux-next/fs/kernfs
Ayush Mittal 26e28d68b1 kernfs: Allocating memory for kernfs_iattrs with kmem_cache.
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@samsung.com>
Signed-off-by: Vaneet Narang <v.narang@samsung.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-08 12:57:32 +01:00
..
dir.c kernfs: Allocating memory for kernfs_iattrs with kmem_cache. 2019-02-08 12:57:32 +01:00
file.c kernfs: Improve kernfs_notify() poll notification latency 2018-11-27 11:59:33 +01:00
inode.c kernfs: Allocating memory for kernfs_iattrs with kmem_cache. 2019-02-08 12:57:32 +01:00
Kconfig kernfs: add CONFIG_KERNFS 2014-02-07 16:08:57 -08:00
kernfs-internal.h kernfs: Allocating memory for kernfs_iattrs with kmem_cache. 2019-02-08 12:57:32 +01:00
Makefile sysfs, kernfs: add skeletons for kernfs 2013-11-27 13:28:24 -08:00
mount.c kernfs: Allocating memory for kernfs_iattrs with kmem_cache. 2019-02-08 12:57:32 +01:00
symlink.c kernfs: Fix range checks in kernfs_get_target_path 2018-09-16 22:38:57 +02:00