Re: [RFC/PATCH] slab: clean up allocation

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

 



On Fri, 29 Sep 2006, Pekka J Enberg wrote:

> + * When allocating from current node.
> + */
> +#define SLAB_CURRENT_NODE (-1)
> +

If we want a constant here then we would better define a global one and 
use it throughout the kernel.

Something like

#define LOCAL_NODE (-1)

Maybe in include/*/topology.h ?


>  #endif
>  
> -static inline void *____cache_alloc(struct kmem_cache *cachep, gfp_t flags)
> +static inline void *cache_alloc_local(struct kmem_cache *cachep, gfp_t flags)
>  {
>  	void *objp;
>  	struct array_cache *ac;
> @@ -3059,35 +3064,6 @@ static inline void *____cache_alloc(stru
>  	return objp;
>  }

This is not really local in the sense of node local but its processor 
local. The speciality here is that we allocate from the per processor
list of objects. cache_alloc_cpu?

The rest looks fine on first glance.

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux