[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251103203805.GH3245006@noisy.programming.kicks-ass.net>
Date: Mon, 3 Nov 2025 21:38:05 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Tejun Heo <tj@...nel.org>
Cc: David Vernet <void@...ifault.com>, Andrea Righi <arighi@...dia.com>,
Changwoo Min <changwoo@...lia.com>,
Dan Schatzberg <dschatzberg@...a.com>, linux-kernel@...r.kernel.org,
cgroups@...r.kernel.org, sched-ext@...ts.linux.dev
Subject: Re: [PATCH v2 4/4] sched_ext: Fix cgroup exit ordering by moving
sched_ext_free() to finish_task_switch()
On Mon, Nov 03, 2025 at 10:31:36AM -1000, Tejun Heo wrote:
> Hello,
>
> On Mon, Nov 03, 2025 at 09:28:43PM +0100, Peter Zijlstra wrote:
> > > @@ -5222,6 +5222,12 @@ static struct rq *finish_task_switch(str
> > > if (prev->sched_class->task_dead)
> > > prev->sched_class->task_dead(prev);
> >
> > ^^^ can you not use task_dead_scx() ?
>
> Unfortunately not. Because sched class switches are atomic infallible
> operations, all tasks in the system must be prepped on scheduler attach &
> fork regardless of their current sched class and thus have to be cleaned up
> in the same way on detach & exit.
Ah, I see scx_post_fork() and sched_ext_free^H^H^H^Hdead() effectively
duplicate the tasklist.
Oh well.
Powered by blists - more mailing lists