[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aAl5OIe5GLv1tkh1@slm.duckdns.org>
Date: Wed, 23 Apr 2025 13:35:20 -1000
From: Tejun Heo <tj@...nel.org>
To: Andrea Righi <arighi@...dia.com>
Cc: David Vernet <void@...ifault.com>, Changwoo Min <changwoo@...lia.com>,
Jake Hillion <jake@...lion.co.uk>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] sched_ext: Clarify CPU context for running/stopping
callbacks
On Wed, Apr 23, 2025 at 11:02:05PM +0200, Andrea Righi wrote:
> The ops.running() and ops.stopping() callbacks can be invoked from a CPU
> other than the one the task is assigned to, particularly when a task
> property is changed, as both scx_next_task_scx() and dequeue_task_scx() may
> run on CPUs different from the task's target CPU.
>
> This behavior can lead to confusion or incorrect assumptions if not
> properly clarified, potentially resulting in bugs (see [1]).
>
> Therefore, update the documentation to clarify this aspect and advise
> users to use scx_bpf_task_cpu() to determine the actual CPU the task
> will run on or was running on.
>
> [1] https://github.com/sched-ext/scx/pull/1728
>
> Cc: Jake Hillion <jake@...lion.co.uk>
> Cc: Changwoo Min <changwoo@...lia.com>
> Signed-off-by: Andrea Righi <arighi@...dia.com>
Applied to sched_ext/for-6.16.
Thanks.
--
tejun
Powered by blists - more mailing lists