Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

sched/mmcid: Cacheline align MM CID storage

Both the per CPU storage and the data in mm_struct are heavily used in
context switch. As they can end up next to other frequently modified data,
they are subject to false sharing.

Make them cache line aligned.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://patch.msgid.link/20251119172549.194111661@linutronix.de

authored by

Thomas Gleixner and committed by
Peter Zijlstra
be4463fa 8cea569c

+2 -2
+2 -2
include/linux/rseq_types.h
··· 112 112 */ 113 113 struct mm_cid_pcpu { 114 114 unsigned int cid; 115 - }; 115 + }____cacheline_aligned_in_smp; 116 116 117 117 /** 118 118 * struct mm_mm_cid - Storage for per MM CID data ··· 126 126 struct mm_cid_pcpu __percpu *pcpu; 127 127 unsigned int nr_cpus_allowed; 128 128 raw_spinlock_t lock; 129 - }; 129 + }____cacheline_aligned_in_smp; 130 130 #else /* CONFIG_SCHED_MM_CID */ 131 131 struct mm_mm_cid { }; 132 132 struct sched_mm_cid { };