Re: [PATCH 10/18 v2] sched/fair: Add force push task mechanism for fair

From: Kayra Cizmeci

Date: Sun Oct 11 2026 - 13:44:19 EST


> >
> > On Fri, 9 Oct 2026 at 07:53, Kayra Cizmeci <kayracizmeci@xxxxxxxxx> wrote:
> > >
> > > > task_tick_cache(rq, curr);
> > > >
> > > > - update_misfit_status(curr, rq);
> > > > - check_update_overutilized_status(task_rq(curr));
> > > > + if (!tick_pushable_task(curr, rq, rf)) {
> > > > + update_misfit_status(curr, rq);
> > > > + check_update_overutilized_status(task_rq(curr));
> > > > + }
> > > >
> > > > task_tick_core(rq, curr);
> > > > }
> > >
> > > Hm.
> > >
> > > I think this mechanism added on here does not works.
> >
> > Ah yes, while factorizing the code, I removed this main diff between
> > tick and put events

> In fact this is on purpose.
> fair_check_pushable_task() is the function that is called to decide
> wether we try to push or not a task. In the case of short task, we
> will not push a task that is already alone on the rq

I'm confused. So, is the added tick push mechanism not working at all
on purpose? For future use or something IDK.

Before the fair_check_pushable_task call on tick_pushable_task():

if (rq->nr_running > 1)
return false;

So now at the rest of the function, nr_running have to be equal or smaller than 1.

We call fair_check_pushable_task() with next = NULL.

There are only 2 paths that can return true, one of them requires next to be true,
so it never works. The other one:

if (check_pushable_short_task(rq, p))
return true;

And check_pushable_short_task() does this:

if (cfs_rq->h_nr_runnable <= 1)
return false;

As I know, h_nr_runnable should be smaller than (or equal maybe) to nr_running.

nr_running can be 1 max, so if h_nr_runnable can't pass nr_running it will
always be smaller or equal to 1.

Maybe I'm missing something from the start :-)

Thanks,

Kayra