Re: [patch 4/6] SLUB: Avoid touching page struct when freeing to per cpu slab

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

 



On Thu, 23 Aug 2007, Peter Zijlstra wrote:

> On Wed, 2007-08-22 at 23:46 -0700, Christoph Lameter wrote:
> > plain text document attachment
> > (0008-SLUB-Avoid-touching-page-struct-when-freeing-to-per.patch)
> > Set c->node to -1 if we allocate from a debug slab instead for SlabDebug
> > which requires access the page struct cacheline.
> 
> this relies on node_match() which will only ever return !1 when
> CONFIG_NUMA

Yup the later cmpxchg patches papered that over for awhile.

So we need to also check for -1 if !NUMA

Signed-off-by: Christoph Lameter <[email protected]>

---
 mm/slub.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: linux-2.6.23-rc3-mm1/mm/slub.c
===================================================================
--- linux-2.6.23-rc3-mm1.orig/mm/slub.c	2007-08-23 12:26:55.000000000 -0700
+++ linux-2.6.23-rc3-mm1/mm/slub.c	2007-08-23 12:28:07.000000000 -0700
@@ -1424,8 +1424,10 @@ static void flush_all(struct kmem_cache 
  */
 static inline int node_match(struct kmem_cache_cpu *c, int node)
 {
+	if (node == -1)
+		return 0;
 #ifdef CONFIG_NUMA
-	if (node != -1 && c->node != node)
+	if (c->node != node)
 		return 0;
 #endif
 	return 1;
-
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