Re: [PATCH 1/2] sched/membarrier: Use per-CPU mutexes for targeted commands
From: Aniket Gattani
Date: Fri Apr 10 2026 - 19:47:04 EST
On Fri, 10 Apr 2026 08:48:35 -0400, Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx> wrote:
> On 2026-04-09 17:22, Aniket Gattani wrote:
> [...] > static DEFINE_MUTEX(membarrier_ipi_mutex);
> > -#define SERIALIZE_IPI() guard(mutex)(&membarrier_ipi_mutex)
> > +static DEFINE_PER_CPU(struct mutex, membarrier_cpu_mutexes);
> > + I'd prefer:
>
> SERIALIZE_IPI() -> global
>
> SERIALIZE_IPI_CPU(cpu) -> per-cpu mutex
>
> Rather than the -1 trick.
>
> Thanks,
>
> Mathieu
Thanks for the review.
Agreed. I will fix this in v2 and will wait a couple of business days for anyone else to respond.