Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc59c053 authored by Christoph Lameter's avatar Christoph Lameter Committed by Pekka Enberg
Browse files

slub: Get rid of the another_slab label



We can avoid deactivate slab in special cases if we do the
deactivation of slabs in each code flow that leads to new_slab.

Signed-off-by: default avatarChristoph Lameter <cl@linux.com>
Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
parent 80f08c19
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -1965,8 +1965,10 @@ static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
	if (!page)
		goto new_slab;

	if (unlikely(!node_match(c, node)))
		goto another_slab;
	if (unlikely(!node_match(c, node))) {
		deactivate_slab(s, c);
		goto new_slab;
	}

	stat(s, ALLOC_SLOWPATH);

@@ -1986,7 +1988,7 @@ static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
	VM_BUG_ON(!page->frozen);

	if (unlikely(!object))
		goto another_slab;
		goto new_slab;

	stat(s, ALLOC_REFILL);

@@ -1995,9 +1997,6 @@ static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
	local_irq_restore(flags);
	return object;

another_slab:
	deactivate_slab(s, c);

new_slab:
	page = get_partial(s, gfpflags, node);
	if (page) {