linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Ravikiran G Thirumalai <kiran@scalex86.org>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-mm@kvack.org, manfred@colorfullife.com,
	clameter@engr.sgi.com, Alok Kataria <alokk@calsoftinc.com>
Subject: Re: [patch 2/3] mm: NUMA slab -- node local memory for off slab slab descriptors
Date: Tue, 29 Nov 2005 00:53:18 -0800	[thread overview]
Message-ID: <20051129085318.GB3573@localhost.localdomain> (raw)
In-Reply-To: <20051129085049.GA3573@localhost.localdomain>

Off slab slab management is currently not allocated from node local
memory.  This patch fixes that.

Signed-off-by: Alok N Kataria <alokk@calsoftinc.com>
Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: Shai Fultheim <shai@scalex86.org>

Index: linux-2.6.15-rc1/mm/slab.c
===================================================================
--- linux-2.6.15-rc1.orig/mm/slab.c	2005-11-17 21:32:37.000000000 -0800
+++ linux-2.6.15-rc1/mm/slab.c	2005-11-17 21:32:43.000000000 -0800
@@ -2062,13 +2062,13 @@
 
 /* Get the memory for a slab management obj. */
 static struct slab* alloc_slabmgmt(kmem_cache_t *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 {
@@ -2078,6 +2078,7 @@
 	slabp->inuse = 0;
 	slabp->colouroff = colour_off;
 	slabp->s_mem = objp+colour_off;
+	slabp->nodeid = nodeid;
 
 	return slabp;
 }
@@ -2221,10 +2222,9 @@
 		goto failed;
 
 	/* Get slab management. */
-	if (!(slabp = alloc_slabmgmt(cachep, objp, offset, local_flags)))
+	if (!(slabp = alloc_slabmgmt(cachep, objp, offset, local_flags, nodeid)))
 		goto opps1;
 
-	slabp->nodeid = nodeid;
 	set_slab_attr(cachep, slabp, objp);
 
 	cache_init_objs(cachep, slabp, ctor_flags);

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2005-11-29  8:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-29  8:50 [patch 1/3] mm: NUMA slab -- add alien cache drain statistics Ravikiran G Thirumalai
2005-11-29  8:53 ` Ravikiran G Thirumalai [this message]
2005-11-29 17:48   ` [patch 2/3] mm: NUMA slab -- node local memory for off slab slab descriptors Christoph Lameter
2005-11-29  8:54 ` [patch 3/3] mm: NUMA slab -- minor optimizations Ravikiran G Thirumalai
2005-11-29 17:53   ` Christoph Lameter
2005-12-26 23:42   ` Manfred Spraul
2005-12-27 20:35     ` Christoph Lameter
2005-11-29  9:25 ` [patch 1/3] mm: NUMA slab -- add alien cache drain statistics Andrew Morton
2005-11-29 17:57 ` Christoph Lameter
2005-11-29 18:49   ` Ravikiran G Thirumalai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051129085318.GB3573@localhost.localdomain \
    --to=kiran@scalex86.org \
    --cc=akpm@osdl.org \
    --cc=alokk@calsoftinc.com \
    --cc=clameter@engr.sgi.com \
    --cc=linux-mm@kvack.org \
    --cc=manfred@colorfullife.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox