Cc: Pekka Enberg <penberg@...>, Linus Torvalds <torvalds@...>, Andrew Morton <akpm@...>, <linux-kernel@...>, <linux-mm@...>, <netdev@...>, <trond.myklebust@...>, Daniel Lezcano <dlezcano@...>, Neil Brown <neilb@...>, <cl@...>
On Mon, 2008-07-28 at 11:49 -0500, Matt Mackall wrote:
Right, both make sense, so _kmalloc_size() has my vote.
Like said, I still need to do all the SLOB reservation stuff. That
includes coming up with upper bound fragmentation loss.
For SL[UA]B I use roundup_power_of_two for kmalloc sizes. Thus with the
above ksize(), if we did p=kmalloc(x), then we'd account
roundup_power_of_two(x), and that should be equal to
roundup_power_of_two(ksize(p)), as ksize will always be smaller or equal
to the roundup.
I'm guessing the power of two upper bound is good for SLOB too -
although I haven't tried proving it wrong or tighetening it.
Only the kmem_cache_* reservation stuff would need some extra attention
with SLOB.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html