Re: slab: cache sizes for kmalloc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

> On Fri, Mar 18, 2011 at 06:18, Maksym Planeta <mcsim.planeta@xxxxxxxxx> 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


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux