Re: [RFC] slub: Simplify boot kmem_cache_cpu allocations

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

 



On 6/17/10 11:49 AM, Tejun Heo wrote:
Hello,

On 06/16/2010 07:35 PM, Christoph Lameter wrote:
It's primarily controlled by PERCPU_DYNAMIC_RESERVE.  I don't think
there will be any systematic way to do it other than sizing it
sufficiently.  Can you calculate the upper bound?  The constant has
been used primarily for optimization so how it's used needs to be
audited if we wanna guarantee free space in the first chunk but I
don't think it would be too difficult.

The upper bound is SLUB_PAGE_SHIFT * sizeof(struct kmem_cache_cpu).

Thats usually 14 * 104 bytes = 1456 bytes. This may increase to more
than 8k given the future plans to add queues into kmem_cache_cpu.

Alright, will work on that.  Does slab allocator guarantee to return
NULL if called before initialized or is it undefined?  If latter, is
there a way to determine whether slab is initialized yet?

It's undefined and you can use slab_is_available() to check if it's available or not.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  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]