Re: [RFC/PATCH 2/2] slab: consolidate allocation paths

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

 



On Thu, 15 Jun 2006, Pekka Enberg wrote:

> -static inline void *cache_alloc_cpucache(struct kmem_cache *cache, gfp_t flags)
> +static inline void *__cache_alloc(struct kmem_cache *cache, gfp_t flags,
> +				  int nodeid)
>  {
> +	if (nodeid != -1 && nodeid != numa_node_id() &&
> +	    cache->nodelists[nodeid])
> +		return __cache_alloc_node(cache, flags, nodeid);
> +
>  	if (unlikely(current->flags & (PF_SPREAD_SLAB | PF_MEMPOLICY))) {
>  		void *objp = alternate_node_alloc(cache, flags);

So we always run through the additional code that you added for each 
allocation on a numa system? The case of nodeid != -1 is a rare case.

-
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