Re: [PATCH 5/7 v5] sched/fair: Add push task mechanism for EAS

From: Xuewen Yan
Date: Tue Apr 15 2025 - 22:04:16 EST


Hi Vincent,

On Tue, Apr 15, 2025 at 9:51 PM Vincent Guittot
<vincent.guittot@xxxxxxxxxx> wrote:
>

> > I am carefully studying this series of patches. I have some doubts
> > about this part.
> >
> > Need we check the state?
> > READ_ONCE(p->__state) != TASK_RUNNING;
> > Because the tick will check it.
> >
> > On the other hand, need we check the sched_delayed?
> > Because it also checks it in put_prev_task_fair().
>
> In the case of tick, the task is the current task and the only one running
>

If the following occurs:
set_current_state(TASK_INTERRUPTIBLE);
schedule();
__schedule();
local_irq_disable();

the tick occurs between set_current_state() and local_irq_disable(),
maybe we do not need to migrate it.


BR
---
xuewen