On Fri, 2008-01-04 at 13:36 -0800, Christoph Lameter wrote: > Ok. So lets try a worst case scenario. If we do a 128 byte kmalloc > then we > can allocate the following number of object from one 4k slab > > SLUB 32 (all memory of the 4k page is used for 128 byte objects) > SLAB 29/30 (management structure occupies first two/three objects) > SLOB 30(?) (Alignment results in object being 136 byte of effective size, > we have 16 bytes leftover that could be used for a > very small allocation. Right?)
Don't know how you got to 136, the minimum alignment is 4 on x86. But I already said in my last email that SLUB would win for the special case of power of two allocations. But as long as we're looking at worst cases, let's consider an alloc of 257 bytes.. SLUB 8 (1016 bytes wasted) SLOB 15 (105 bytes wasted, with 136 bytes still usable) Can we be done with this now, please? -- Mathematics is the supreme nostalgia of our time. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/