Re: [patch 1/4] sched/mmcid: Prevent CID stalls due to concurrent forks
From: Peter Zijlstra
Date: Wed Mar 11 2026 - 04:03:49 EST
On Wed, Mar 11, 2026 at 08:33:01AM +0100, Jiri Slaby wrote:
> Thomas,
>
> On 10. 03. 26, 21:28, Thomas Gleixner wrote:
> > A newly forked task is accounted as MMCID user before the task is visible
> > in the process' thread list and the global task list. This creates the
> > following problem:
> ...
> > --- a/kernel/sched/core.c
> > +++ b/kernel/sched/core.c
> > @@ -4729,8 +4729,12 @@ void sched_cancel_fork(struct task_struc
> > scx_cancel_fork(p);
> > }
> > +static void sched_mm_cid_fork(struct task_struct *t);
>
> This introduces:
> [ 97s] ../kernel/sched/core.c:4711:13: warning: ‘sched_mm_cid_fork’
> used but never defined
> [ 97s] 4711 | static void sched_mm_cid_fork(struct task_struct *t);
> [ 97s] | ^~~~~~~~~~~~~~~~~
>
> on !CONFIG_SCHED_MM_CID configs. (gcc15-15.2.1+git10776-2.3)
Indeed. I'll fix it before applying.