mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
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>
This commit is contained in:
parent
a6525042bf
commit
6047a007d0
@ -1724,7 +1724,7 @@ static __always_inline void slab_free(struct kmem_cache *s,
|
||||
c = get_cpu_slab(s, smp_processor_id());
|
||||
debug_check_no_locks_freed(object, c->objsize);
|
||||
if (!(s->flags & SLAB_DEBUG_OBJECTS))
|
||||
debug_check_no_obj_freed(object, s->objsize);
|
||||
debug_check_no_obj_freed(object, c->objsize);
|
||||
if (likely(page == c->page && c->node >= 0)) {
|
||||
object[c->offset] = c->freelist;
|
||||
c->freelist = object;
|
||||
|
Loading…
Reference in New Issue
Block a user