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

Mathieu Desnoyers
2026-04-10T12:48:40Z

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

--
Mathieu Desnoyers
EfficiOS Inc.