Re: [PATCH 14/18 v2] sched/fair: Enable push task for preempt short
From: Kayra Cizmeci
Date: Fri Oct 09 2026 - 07:19:51 EST
> 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...
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 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