diff options
author | Pekka Enberg <penberg@cs.helsinki.fi> | 2009-01-14 05:22:25 -0500 |
---|---|---|
committer | Pekka Enberg <penberg@cs.helsinki.fi> | 2009-01-14 10:04:59 -0500 |
commit | 6047a007d0f6b7395cd158f3bdda34ab39a48821 (patch) | |
tree | 3d1bb724290a5134338f3b2496a7252a5ec8dcb8 /mm/slub.c | |
parent | a6525042bfdfcab128bd91fad264de10fd24a55e (diff) |
SLUB: Use ->objsize from struct kmem_cache_cpu in slab_free()
There's no reason to use ->objsize from struct kmem_cache in slab_free() for
the SLAB_DEBUG_OBJECTS case. All it does is generate extra cache pressure as we
try very hard not to touch struct kmem_cache in the fast-path.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Diffstat (limited to 'mm/slub.c')
-rw-r--r-- | mm/slub.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1724,7 +1724,7 @@ static __always_inline void slab_free(struct kmem_cache *s, | |||
1724 | c = get_cpu_slab(s, smp_processor_id()); | 1724 | c = get_cpu_slab(s, smp_processor_id()); |
1725 | debug_check_no_locks_freed(object, c->objsize); | 1725 | debug_check_no_locks_freed(object, c->objsize); |
1726 | if (!(s->flags & SLAB_DEBUG_OBJECTS)) | 1726 | if (!(s->flags & SLAB_DEBUG_OBJECTS)) |
1727 | debug_check_no_obj_freed(object, s->objsize); | 1727 | debug_check_no_obj_freed(object, c->objsize); |
1728 | if (likely(page == c->page && c->node >= 0)) { | 1728 | if (likely(page == c->page && c->node >= 0)) { |
1729 | object[c->offset] = c->freelist; | 1729 | object[c->offset] = c->freelist; |
1730 | c->freelist = object; | 1730 | c->freelist = object; |