All of lore.kernel.org
 help / color / mirror / Atom feed
From: mcsim.planeta@gmail.com (Maksym Planeta)
To: kernelnewbies@lists.kernelnewbies.org
Subject: slab: cache sizes for kmalloc
Date: Fri, 18 Mar 2011 07:52:19 +0200	[thread overview]
Message-ID: <1300427539.10893.22.camel@debian> (raw)
In-Reply-To: <AANLkTimGM8Ui2sq3ny9XuSyvkWY3F9PbuBixsg=KMbk6@mail.gmail.com>

On Fri, 18/03/2011 at 06:56 +0700, Mulyadi Santosa wrote:

> On Fri, Mar 18, 2011 at 06:18, Maksym Planeta <mcsim.planeta@gmail.com> wrote:
> > I've wrote a hook were I've counted witch object sizes are the most
> > popular.
> 
> Uhuh, and why you just don't use "slabtop" utility which just use
> /proc/slabinfo?

In slabinfo I can see which cache how many objects has. But I was
interested witch object sizes are requested most of all. And there isn't
such information in slabinfo. For example, if I request 8 bytes 32-byte
object will be allocated. And there is no information in slabinfo how
much memory I really needed. 

> I think 32 byte is chosen due to the size of the page in x86 32 bit ==
> 4 KiB... by doing that, cache is simply allocated using page_alloc (or
> alloc_page? I forgot) and then later "teared apart" into slab
> objects...
> 

But in slub allocator there are 8- and 16- byte caches. Why in slab
can't be the same? 

-- 
Thanks,

Maksym Planeta

  reply	other threads:[~2011-03-18  5:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-17 23:18 slab: cache sizes for kmalloc Maksym Planeta
2011-03-17 23:56 ` Mulyadi Santosa
2011-03-18  5:52   ` Maksym Planeta [this message]
2011-03-18 22:26     ` Mulyadi Santosa

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=1300427539.10893.22.camel@debian \
    --to=mcsim.planeta@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /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.