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

From: Mathieu Desnoyers

Date: Wed Oct 29 2025 - 11:39:51 EST


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.
https://www.efficios.com