Re: [PATCH 1/2] sched/membarrier: Use per-CPU mutexes for targeted commands

Aniket Gattani
2026-04-10T23:44:06Z

On Fri, 10 Apr 2026 08:48:35 -0400, Mathieu Desnoyers <mathieu.desnoyers@efficios.com> 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.