Re: [patch 2/4] sched/mmcid: Protect transition on weakly ordered systems
From: Mathieu Desnoyers
Date: Fri Jan 30 2026 - 10:36:45 EST
On 2026-01-29 16:20, Thomas Gleixner wrote:
[...]
-static void mm_cid_fixup_tasks_to_cpus(void)
+static void mm_cid_do_fixup_tasks_to_cpus(struct mm_struct *mm)
{
- struct mm_struct *mm = current->mm;
struct task_struct *p, *t;
unsigned int users;
@@ -10590,6 +10598,15 @@ static void mm_cid_fixup_tasks_to_cpus(v
}
}
+static void mm_cid_fixup_tasks_to_cpus(void)
+{
+ struct mm_struct *mm = current->mm;
+
+ mm_cid_do_fixup_tasks_to_cpus(mm);
+ /* Clear the transition bit in the mode */
+ WRITE_ONCE(mm->mm_cid.mode, MM_CID_ONCPU);
I'm missing something here. Why not just move this write once
to the end of cid_fixup_tasks_to_cpus ? Why the "do" wrapper
that has a single caller ?
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com