Re: [patch V3 03/20] sched/mmcid: Cacheline align MM CID storage

Mathieu Desnoyers
2025-10-29T15:39:51Z

On 2025-10-29 09:08, Thomas Gleixner wrote:
[...]
> struct mm_cid_pcpu {
> unsigned int cid;
> -};
> +}____cacheline_aligned_in_smp;

What's the point in cacheline aligning this per-CPU variable ?
Should we expect other accesses to per-CPU variables sharing the
same cache line to update them frequently from remote CPUs ?

I did not cacheline align it expecting that per-CPU variables are
typically updated from their respective CPUs. So perhaps reality
don't match my expectations, but that's news to me.

> @@ -126,7 +126,7 @@ struct mm_mm_cid {
[...]
> -};
> +}____cacheline_aligned_in_smp;

OK for this cacheline align.

Thanks,

Mathieu

--
Mathieu Desnoyers
EfficiOS Inc.