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) <[email protected]> Reviewed-by: Vlastimil Babka <[email protected]> Signed-off-by: Chengming Zhou <[email protected]> Signed-off-by: Vlastimil Babka <[email protected]>
1 parent 90b1e56 commit a6def11

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

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)