Re: [PATCH v4 29/35] mm: slub: Move flush_cpu_slab() invocations __free_slab() invocations out of IRQ context
From: Vlastimil Babka
Date: Wed Aug 11 2021 - 04:55:39 EST
On 8/10/21 4:33 PM, Vlastimil Babka wrote:
> On 8/9/21 3:41 PM, Qian Cai wrote:
>
>>> static void flush_all(struct kmem_cache *s)
>>> {
>>> - on_each_cpu_cond(has_cpu_slab, flush_cpu_slab, s, 1);
>>> + struct slub_flush_work *sfw;
>>> + unsigned int cpu;
>>> +
>>> + mutex_lock(&flush_lock);
>>
>> Vlastimil, taking the lock here could trigger a warning during memory offline/online due to the locking order:
>>
>> slab_mutex -> flush_lock
>
> Here's the full fixup, also incorporating Mike's fix. Thanks.
>
One more fixup, sorry for the churn.
----8<----