[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1a531839-8380-4f62-8299-fd7556448cca@efficios.com>
Date: Mon, 17 Nov 2025 14:40:47 -0500
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: Thomas Gleixner <tglx@...utronix.de>, LKML <linux-kernel@...r.kernel.org>
Cc: Peter Zijlstra <peterz@...radead.org>,
Gabriele Monaco <gmonaco@...hat.com>, Michael Jeanson
<mjeanson@...icios.com>, Jens Axboe <axboe@...nel.dk>,
"Paul E. McKenney" <paulmck@...nel.org>,
"Gautham R. Shenoy" <gautham.shenoy@....com>,
Florian Weimer <fweimer@...hat.com>, Tim Chen <tim.c.chen@...el.com>,
Yury Norov <yury.norov@...il.com>, Shrikanth Hegde <sshegde@...ux.ibm.com>
Subject: Re: [patch V4 16/20] sched/mmcid: Provide new scheduler CID mechanism
On 2025-11-16 15:49, Thomas Gleixner wrote:
[...]
> The current upstream implementation tries to keep the CID with the task
> even in overcommit situations, which complicates task migration. It also
> has to do the CID space consolidation work from a task work in the exit to
> user space path. As that work is assigned to a random task related to a MM
> this can inflict unwanted exit latencies.
>
> Implement the context switch parts of a strict ownership mechanism to
> address this.
>
> This removes most of the work from the task which schedules out. Only
> during transitioning from per CPU to per task ownership it is required to
> drop the CID when leaving the CPU to prevent CID space exhaustion. Other
> than that scheduling out is just a single check and branch.
Same comment as for prior patch.
[...]
> struct mm_mm_cid {
> + /* Hotpath read mostly members */
> struct mm_cid_pcpu __percpu *pcpu;
> + unsigned int percpu;
> + unsigned int transit;
[...]
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -10495,6 +10495,7 @@ void mm_init_cid(struct mm_struct *mm, s
> per_cpu_ptr(pcpu, cpu)->cid = MM_CID_UNSET;
>
> mm->mm_cid.max_cids = 0;
> + mm->mm_cid.percpu = 0;
I'm unsure where it appears (maybe later in the series ?), but
I would have expected:
mm->mm_cid.transit = 0;
here.
Other than those comments:
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
Powered by blists - more mailing lists