]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
sched_ext: Remove unused code in the do_pick_task_scx()
authorZqiang <qiang.zhang@linux.dev>
Mon, 15 Dec 2025 11:29:40 +0000 (19:29 +0800)
committerTejun Heo <tj@kernel.org>
Mon, 15 Dec 2025 15:53:49 +0000 (05:53 -1000)
The kick_idle variable is no longer used, this commit therefore remove
it and also remove associated code in the do_pick_task_scx().

Signed-off-by: Zqiang <qiang.zhang@linux.dev>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/sched/ext.c

index 695503a2f7d1ed572745cfdf0b1fe7fcc48663e4..94164f2dec6dce71f929376c30db10e54fd39af0 100644 (file)
@@ -2446,7 +2446,7 @@ static struct task_struct *
 do_pick_task_scx(struct rq *rq, struct rq_flags *rf, bool force_scx)
 {
        struct task_struct *prev = rq->curr;
-       bool keep_prev, kick_idle = false;
+       bool keep_prev;
        struct task_struct *p;
 
        /* see kick_cpus_irq_workfn() */
@@ -2488,12 +2488,8 @@ do_pick_task_scx(struct rq *rq, struct rq_flags *rf, bool force_scx)
                        refill_task_slice_dfl(rcu_dereference_sched(scx_root), p);
        } else {
                p = first_local_task(rq);
-               if (!p) {
-                       if (kick_idle)
-                               scx_kick_cpu(rcu_dereference_sched(scx_root),
-                                            cpu_of(rq), SCX_KICK_IDLE);
+               if (!p)
                        return NULL;
-               }
 
                if (unlikely(!p->scx.slice)) {
                        struct scx_sched *sch = rcu_dereference_sched(scx_root);