Skip to content

Commit 0574182

Browse files
Chengming Zhouopsiff
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> (cherry picked from commit a6def11)
1 parent 2cdc011 commit 0574182

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
@@ -3812,7 +3812,6 @@ static void __slab_free(struct kmem_cache *s, struct slab *slab,
38123812
* then add it.
38133813
*/
38143814
if (!kmem_cache_has_cpu_partial(s) && unlikely(!prior)) {
3815-
remove_full(s, n, slab);
38163815
add_partial(n, slab, DEACTIVATE_TO_TAIL);
38173816
stat(s, FREE_ADD_PARTIAL);
38183817
}
@@ -3826,9 +3825,6 @@ static void __slab_free(struct kmem_cache *s, struct slab *slab,
38263825
*/
38273826
remove_partial(n, slab);
38283827
stat(s, FREE_REMOVE_PARTIAL);
3829-
} else {
3830-
/* Slab must be on the full list */
3831-
remove_full(s, n, slab);
38323828
}
38333829

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

0 commit comments

Comments
 (0)