Re: slab:Fix the unexpected index mapping result of kmalloc_size(INDEX_NODE + 1)

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

 



On Fri, 31 Jul 2015, Joonsoo Kim wrote:

> I don't think that this fix is right.
> Just "kmalloc_size(INDEX_NODE) * 2" looks insane because it means 192 * 2
> = 384 on his platform. Why we need to check size is larger than 384?

Its an arbitrary boundary. Making it large ensures that the smaller caches
stay operational and do not fall back to page sized allocations.

> I'm wondering what's the meaning of this check "size >=
> kmalloc_size(INDEX_NODE + 1)".

This is pretty old code. IMHO The check is if it fits in the
kmem_cache used for INDEX_NODE. If not then fall back to a page sized
allocation for the cache. Looks like DEBUG_PAGEALLOC wants one page per
object.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]