All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Ayush Mittal <ayush.m@samsung.com>
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	pankaj.m@samsung.com, a.sahrawat@samsung.com,
	v.narang@samsung.com
Subject: Re: [PATCH v2] kernfs: Allocating memory for kernfs_iattrs with kmem_cache.
Date: Wed, 6 Feb 2019 08:35:54 -0800	[thread overview]
Message-ID: <20190206163554.GI50184@devbig004.ftw2.facebook.com> (raw)
In-Reply-To: <1549428942-5466-1-git-send-email-ayush.m@samsung.com>

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@samsung.com>
> Signed-off-by: Vaneet Narang <v.narang@samsung.com>

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

Thanks.

-- 
tejun

      reply	other threads:[~2019-02-06 16:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20190206050507epcas5p30ea6ad0f13693aeacbf41088d2c380a5@epcas5p3.samsung.com>
2019-02-06  4:55 ` [PATCH v2] kernfs: Allocating memory for kernfs_iattrs with kmem_cache Ayush Mittal
2019-02-06 16:35   ` Tejun Heo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190206163554.GI50184@devbig004.ftw2.facebook.com \
    --to=tj@kernel.org \
    --cc=a.sahrawat@samsung.com \
    --cc=ayush.m@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pankaj.m@samsung.com \
    --cc=v.narang@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.