]> git.baikalelectronics.ru Git - kernel.git/commit
mm/slub: remove slab_lock() usage for debug operations
authorVlastimil Babka <vbabka@suse.cz>
Tue, 23 Aug 2022 17:03:58 +0000 (19:03 +0200)
committerVlastimil Babka <vbabka@suse.cz>
Fri, 16 Sep 2022 22:18:29 +0000 (00:18 +0200)
commit6eef3dd98171e8e3cb2e4de3f331e9347f3bd928
tree1aa9c97766350abbf863da91f433d2bc6b0a39ee
parent5860538484411349daea1accd73c28daec77ee64
mm/slub: remove slab_lock() usage for debug operations

All alloc and free operations on debug caches are now serialized by
n->list_lock, so we can remove slab_lock() usage in validate_slab()
and list_slab_objects() as those also happen under n->list_lock.

Note the usage in list_slab_objects() could happen even on non-debug
caches, but only during cache shutdown time, so there should not be any
parallel freeing activity anymore. Except for buggy slab users, but in
that case the slab_lock() would not help against the common cmpxchg
based fast paths (in non-debug caches) anyway.

Also adjust documentation comments accordingly.

Suggested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Acked-by: David Rientjes <rientjes@google.com>
mm/slub.c