Re: [PATCH] sched/psi: Use task->psi_flags to clear in CPU migration

From: Johannes Weiner
Date: Tue Sep 27 2022 - 09:39:13 EST


On Mon, Sep 26, 2022 at 04:19:31PM +0800, Chengming Zhou wrote:
> The commit d583d360a620 ("psi: Fix psi state corruption when schedule()
> races with cgroup move") fixed a race problem by making cgroup_move_task()
> use task->psi_flags instead of looking at the scheduler state.
>
> We can extend task->psi_flags usage to CPU migration, which should be
> a minor optimization for performance and code simplicity.
>
> Signed-off-by: Chengming Zhou <zhouchengming@xxxxxxxxxxxxx>

Nice one!

Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx>