* slub: Remove node check for NUMA_NO_NODE in slab_free
@ 2011-05-17 21:17 Christoph Lameter
2011-05-17 21:29 ` Christoph Lameter
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Lameter @ 2011-05-17 21:17 UTC (permalink / raw)
To: Pekka Enberg; +Cc: linux-mm, David Rientjes
Subject: slub: Remove node check in slab_free
We can set the page pointer in the percpu structure to
NULL to have the same effect as setting c->node to NUMA_NO_NODE.
Gets rid of one check in slab_free() that was only used for
forcing the slab_free to the slowpath for debugging.
We still need to set c->node to NUMA_NO_NODE to force the
slab_alloc() fastpath to the slowpath in case of debugging.
Signed-off-by: Christoph Lameter <cl@linux.com>
---
mm/slub.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: linux-2.6/mm/slub.c
===================================================================
--- linux-2.6.orig/mm/slub.c 2011-05-17 16:04:28.341344328 -0500
+++ linux-2.6/mm/slub.c 2011-05-17 16:14:50.081343603 -0500
@@ -1881,6 +1881,7 @@ debug:
page->inuse++;
page->freelist = get_freepointer(s, object);
+ c->page = NULL;
c->node = NUMA_NO_NODE;
goto unlock_out;
}
@@ -2112,7 +2113,7 @@ redo:
tid = c->tid;
barrier();
- if (likely(page == c->page && c->node != NUMA_NO_NODE)) {
+ if (likely(page == c->page)) {
set_freepointer(s, object, c->freelist);
if (unlikely(!irqsafe_cpu_cmpxchg_double(
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: slub: Remove node check for NUMA_NO_NODE in slab_free
2011-05-17 21:17 slub: Remove node check for NUMA_NO_NODE in slab_free Christoph Lameter
@ 2011-05-17 21:29 ` Christoph Lameter
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Lameter @ 2011-05-17 21:29 UTC (permalink / raw)
To: Pekka Enberg; +Cc: linux-mm, David Rientjes
Argh not that simple without the ll patches. Need to deactivate slab
before setting c->page to NULL.
Subject: slub: Remove node check in slab_free
We can set the page pointing in the percpu structure to
NULL to have the same effect as setting c->node to NUMA_NO_NODE.
Gets rid of one check in slab_free() that was only used for
forcing the slab_free to the slowpath for debugging.
We still need to set c->node to NUMA_NO_NODE to force the
slab_alloc() fastpath to the slowpath in case of debugging.
Signed-off-by: Christoph Lameter <cl@linux.com>
---
mm/slub.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: linux-2.6/mm/slub.c
===================================================================
--- linux-2.6.orig/mm/slub.c 2011-05-17 16:04:28.341344328 -0500
+++ linux-2.6/mm/slub.c 2011-05-17 16:22:07.621343094 -0500
@@ -1881,6 +1881,8 @@ debug:
page->inuse++;
page->freelist = get_freepointer(s, object);
+ deactivate_slab(s, c);
+ c->page = NULL;
c->node = NUMA_NO_NODE;
goto unlock_out;
}
@@ -2112,7 +2114,7 @@ redo:
tid = c->tid;
barrier();
- if (likely(page == c->page && c->node != NUMA_NO_NODE)) {
+ if (likely(page == c->page)) {
set_freepointer(s, object, c->freelist);
if (unlikely(!irqsafe_cpu_cmpxchg_double(
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-17 21:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-17 21:17 slub: Remove node check for NUMA_NO_NODE in slab_free Christoph Lameter
2011-05-17 21:29 ` Christoph Lameter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox