Skip to content

Commit a6def11

Browse files
Chengming Zhoutehcaster
authored andcommitted
mm/slub: remove full list manipulation for non-debug slab
Since debug slab is processed by free_to_partial_list(), and only debug slab which has SLAB_STORE_USER flag would care about the full list, we can remove these unrelated full list manipulations from __slab_free(). Acked-by: Christoph Lameter (Ampere) <cl@linux.com> Reviewed-by: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
1 parent 90b1e56 commit a6def11

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

mm/slub.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4188,7 +4188,6 @@ static void __slab_free(struct kmem_cache *s, struct slab *slab,
41884188
* then add it.
41894189
*/
41904190
if (!kmem_cache_has_cpu_partial(s) && unlikely(!prior)) {
4191-
remove_full(s, n, slab);
41924191
add_partial(n, slab, DEACTIVATE_TO_TAIL);
41934192
stat(s, FREE_ADD_PARTIAL);
41944193
}
@@ -4202,9 +4201,6 @@ static void __slab_free(struct kmem_cache *s, struct slab *slab,
42024201
*/
42034202
remove_partial(n, slab);
42044203
stat(s, FREE_REMOVE_PARTIAL);
4205-
} else {
4206-
/* Slab must be on the full list */
4207-
remove_full(s, n, slab);
42084204
}
42094205

42104206
spin_unlock_irqrestore(&n->list_lock, flags);

0 commit comments

Comments
 (0)