Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750948AbWCaFxp (ORCPT ); Fri, 31 Mar 2006 00:53:45 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750979AbWCaFxo (ORCPT ); Fri, 31 Mar 2006 00:53:44 -0500 Received: from ns1.siteground.net ([207.218.208.2]:9121 "EHLO serv01.siteground.net") by vger.kernel.org with ESMTP id S1750934AbWCaFxo (ORCPT ); Fri, 31 Mar 2006 00:53:44 -0500 Date: Thu, 30 Mar 2006 21:54:28 -0800 From: Ravikiran G Thirumalai To: Andrew Morton Cc: linux-kernel@vger.kernel.org, Christoph Lameter , "Shai Fultheim (Shai@scalex86.org)" , Alok Kataria , Pekka J Enberg Subject: [patch] slab: allocate node local memory for off-slab slabmanagement Message-ID: <20060331055428.GA4334@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - serv01.siteground.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - scalex86.org X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1752 Lines: 50 Allocate off-slab slab descriptors from node local memory. Signed-off-by: Alok N Kataria Signed-off-by: Ravikiran Thirumalai Signed-off-by: Shai Fultheim Index: linux-2.6.16mm2/mm/slab.c =================================================================== --- linux-2.6.16mm2.orig/mm/slab.c 2006-03-30 15:47:55.000000000 -0800 +++ linux-2.6.16mm2/mm/slab.c 2006-03-30 17:11:07.000000000 -0800 @@ -2330,13 +2330,15 @@ EXPORT_SYMBOL(kmem_cache_destroy); /* Get the memory for a slab management obj. */ static struct slab *alloc_slabmgmt(struct kmem_cache *cachep, void *objp, - int colour_off, gfp_t local_flags) + int colour_off, gfp_t local_flags, + int nodeid) { struct slab *slabp; if (OFF_SLAB(cachep)) { /* Slab management obj is off-slab. */ - slabp = kmem_cache_alloc(cachep->slabp_cache, local_flags); + slabp = kmem_cache_alloc_node(cachep->slabp_cache, + local_flags, nodeid); if (!slabp) return NULL; } else { @@ -2346,6 +2348,7 @@ static struct slab *alloc_slabmgmt(struc slabp->inuse = 0; slabp->colouroff = colour_off; slabp->s_mem = objp + colour_off; + slabp->nodeid = nodeid; return slabp; } @@ -2532,7 +2535,7 @@ static int cache_grow(struct kmem_cache goto failed; /* Get slab management. */ - slabp = alloc_slabmgmt(cachep, objp, offset, local_flags); + slabp = alloc_slabmgmt(cachep, objp, offset, local_flags, nodeid); if (!slabp) goto opps1; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/