Re: [PATCH v2 04/15] sched/core: Fix picking of tasks for core scheduling with DL server

From: Daniel Bristot de Oliveira
Date: Fri Apr 05 2024 - 05:38:07 EST


On 3/13/24 02:24, Joel Fernandes (Google) wrote:
> * Use simple CFS pick_task for DL pick_task
>
> DL server's pick_task calls CFS's pick_next_task_fair(), this is wrong
> because core scheduling's pick_task only calls CFS's pick_task() for
> evaluation / checking of the CFS task (comparing across CPUs), not for
> actually affirmatively picking the next task. This causes RB tree corruption
> issues in CFS that were found by syzbot.
>
> * Make pick_task_fair clear DL server
>
> A DL task pick might set ->dl_server, but it is possible the task will
> never run (say the other HT has a stop task). If the CFS task is picked
> in the future directly (say without DL server), ->dl_server will be
> set. So clear it in pick_task_fair().
>
> This fixes the KASAN issue reported by syzbot in set_next_entity().

These two sched/core patches seem to make sense.... things are working with them.

But I am not an expert in the CORE_SCHED, so I am adding them on top of the dl
server series in the v6... it is easier for people to review them...

The only thing I did was to adjust the log to fit into the 75 char that
checkpatch warns...

Thoughts?

-- Daniel