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

From: Christoph Lameter
Date: Sat Jun 17 2006 - 12:38:21 EST


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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/