Re: CK1 [07/13] slab: Use common kmalloc_index/kmalloc_size functions

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

 



On 09/27/2012 12:18 AM, Christoph Lameter wrote:
> Make slab use the common functions. We can get rid of a lot
> of old ugly stuff as a results. Among them the sizes
> array and the weird include/linux/kmalloc_sizes file and
> some pretty bad #include statements in slab_def.h.
> 
> The one thing that is different in slab is that the 32 byte
> cache will also be created for arches that have page sizes
> larger than 4K. There are numerous smaller allocations that
> SLOB and SLUB can handle better because of their support for
> smaller allocation sizes so lets keep the 32 byte slab also
> for arches with > 4K pages.
> 
> Signed-off-by: Christoph Lameter <cl@xxxxxxxxx>
> 

I believe this makes sense, and the code looks better now.

Reviewed-by: Glauber Costa <glommer@xxxxxxxxxxxxx>

One nitpick:

>  
> @@ -185,26 +169,19 @@ static __always_inline void *kmalloc_nod
>  	struct kmem_cache *cachep;
>  
>  	if (__builtin_constant_p(size)) {
> -		int i = 0;
> +		int i;
>  

Although this is technically correct, the former is correct as well, and
this end up only adding churn to the patch.

Should you decide to remove it, there is another instance of this a bit
more down.

--
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]