Re: slab: cache sizes for kmalloc

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

 



Hi....

Probably just a quick share from me...

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?

>They were objects of sizes 8 and 16 bytes, but the smallest
> available cache has size 32 bytes. So in this cache fragmentation is
> about 40%. There is big fragmentation in 512 and 1024-byte caches too --
> 25 and 35 percent correspondingly. Also there are empty caches, all DMA
> caches on my system are empty. In total there is wasting of memory.

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...

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

_______________________________________________
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