Re: [patch] v2 mm/slub: restore/expand unfreeze_partials() local exclusion scope

From: Mike Galbraith
Date: Sun Jul 18 2021 - 11:43:40 EST


It's moot, but for the record...

@@ -2418,6 +2418,17 @@ static void __unfreeze_partials(struct k
> if (n)
> spin_unlock_irqrestore(&n->list_lock, flags);
>
> + /*
> + * If we got here via __slab_free() -> put_cpu_partial(),
> + * memcg_free_page_obj_cgroups() ->kfree() may send us
> + * back to __slab_free() -> put_cpu_partial() for an
> + * unfortunate second encounter with cpu_slab->lock.
> + */
> + if (IS_ENABLED(CONFIG_PREEMPT_RT) && memcg_kmem_enabled()) {
> + lockdep_assert_held(this_cpu_ptr(&s->cpu_slab.lock.lock));

...that assert needs to hide behind something less transparent.

-Mike