[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54fc689c-fa9a-4e9d-9f5e-9dfd7da54a02@efficios.com>
Date: Fri, 30 Jan 2026 10:36:36 -0500
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: Thomas Gleixner <tglx@...nel.org>, LKML <linux-kernel@...r.kernel.org>
Cc: Ihor Solodrai <ihor.solodrai@...ux.dev>,
Shrikanth Hegde <sshegde@...ux.ibm.com>,
Peter Zijlstra <peterz@...radead.org>,
Michael Jeanson <mjeanson@...icios.com>
Subject: Re: [patch 2/4] sched/mmcid: Protect transition on weakly ordered
systems
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
Powered by blists - more mailing lists