diff options
author | Christoph Lameter <cl@linux.com> | 2011-05-17 17:29:31 -0400 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2011-05-21 05:53:53 -0400 |
commit | 442b06bcea23a01934d3da7ec5898fa154a6cafb (patch) | |
tree | bc08b4a9d7723057a1ff1687a90cdb608b3c8cce /mm | |
parent | bd07d87fd4b8a6af9820544b6bc6c37215d6f8ad (diff) |
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>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slub.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1881,6 +1881,8 @@ debug: | |||
1881 | 1881 | ||
1882 | page->inuse++; | 1882 | page->inuse++; |
1883 | page->freelist = get_freepointer(s, object); | 1883 | page->freelist = get_freepointer(s, object); |
1884 | deactivate_slab(s, c); | ||
1885 | c->page = NULL; | ||
1884 | c->node = NUMA_NO_NODE; | 1886 | c->node = NUMA_NO_NODE; |
1885 | goto unlock_out; | 1887 | goto unlock_out; |
1886 | } | 1888 | } |
@@ -2112,7 +2114,7 @@ redo: | |||
2112 | tid = c->tid; | 2114 | tid = c->tid; |
2113 | barrier(); | 2115 | barrier(); |
2114 | 2116 | ||
2115 | if (likely(page == c->page && c->node != NUMA_NO_NODE)) { | 2117 | if (likely(page == c->page)) { |
2116 | set_freepointer(s, object, c->freelist); | 2118 | set_freepointer(s, object, c->freelist); |
2117 | 2119 | ||
2118 | if (unlikely(!this_cpu_cmpxchg_double( | 2120 | if (unlikely(!this_cpu_cmpxchg_double( |