lkml.org 
[lkml]   [2007]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [patch 4/6] SLUB: Avoid touching page struct when freeing to per cpu slab
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 <clameter@sgi.com>

---
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 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/
\
 
 \ /
  Last update: 2007-08-23 21:33    [W:0.054 / U:0.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site