Re: [PATCH 14/18 v2] sched/fair: Enable push task for preempt short
From: Vincent Guittot
Date: Fri Oct 09 2026 - 10:07:39 EST
On Fri, 9 Oct 2026 at 13:16, Kayra Cizmeci <kayracizmeci@xxxxxxxxx> wrote:
>
> > Enable push mecanism for the preempt short feature which is the
> > 1st feature using it.
>
> IDK typo count of 'mecanism'. It would be cool if I counted the typos I found in this thread.
> They're so important. But, I didn't counted them
>
> > @@ -3475,6 +3475,9 @@ static void partition_sched_domains_locked(int ndoms_new, cpumask_var_t doms_new
> > sched_energy_set(has_eas);
> > #endif
> >
> > + if (sched_feat(PREEMPT_SHORT))
> > + static_branch_inc_cpuslocked(&sched_push_task);
> > +
>
> Well, as I checked it seems like first user of the push 'mecanism' can't be disabled.
> This could be the correct behavior too tho? If we want to open it and do not let it
> close even when PREEMPT_SHORT is false...
I didn't want to make the push mechanism enabled by default but only
when something uses it. Short slice tasks are the 1st user.
I wanted to keep a simple way to disable it at boot when it isn't used.
>
> But I think you wanted to connect this to PREEMPT_SHORT, no?
> Well if no, then well I have no words. If yes, I have.
>
> I done a quick test, adding this line to here:
>
> if (sched_feat(PREEMPT_SHORT))
> static_branch_inc_cpuslocked(&sched_push_task);
> pr_info("push key count=%d\n", static_key_count(&sched_push_task.key)); <--- This
>
> And booting up the kernel. Playing with CPU1's online status and closing PREEMPT_SHORT.
> And...
>
> [ 0.967146] push key count=1
> 0
> 1
> [ 0.967146] push key count=1
> [ 42.408439] push key count=2
> [ 42.475103] push key count=3
> NO_PREEMPT_SHORT
> 0
> 1
> [ 0.967146] push key count=1
> [ 42.408439] push key count=2
> [ 42.475103] push key count=3
> [ 42.562426] push key count=3
> [ 42.619255] push key count=3
This should not happen. I will fix it
>
> This is a bit messy since it's raw, but as you can see even when we
> close PREEMPT_SHORT this not decreases. It just stays on and grows over time.
>
> That's what I'll say, maybe I'm missing something.
>
> Thanks,
> Kayra