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