* [PATCH] sched_ext: Remove unused code in the do_pick_task_scx()
@ 2025-12-15 11:29 Zqiang
2025-12-15 13:58 ` Andrea Righi
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Zqiang @ 2025-12-15 11:29 UTC (permalink / raw)
To: tj, void, arighi, changwoo; +Cc: sched-ext, linux-kernel, qiang.zhang
The kick_idle variable is no longer used, this commit therefore remove
it and also remove associated code in the do_pick_task_scx().
Fixes: 4c95380701f5 ("sched/ext: Fold balance_scx() into pick_task_scx()"),
Signed-off-by: Zqiang <qiang.zhang@linux.dev>
---
kernel/sched/ext.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index 695503a2f7d1..94164f2dec6d 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -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);
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] sched_ext: Remove unused code in the do_pick_task_scx()
2025-12-15 11:29 [PATCH] sched_ext: Remove unused code in the do_pick_task_scx() Zqiang
@ 2025-12-15 13:58 ` Andrea Righi
2025-12-15 15:05 ` Emil Tsalapatis
2025-12-15 15:57 ` Tejun Heo
2 siblings, 0 replies; 5+ messages in thread
From: Andrea Righi @ 2025-12-15 13:58 UTC (permalink / raw)
To: Zqiang; +Cc: tj, void, changwoo, sched-ext, linux-kernel
On Mon, Dec 15, 2025 at 07:29:40PM +0800, Zqiang wrote:
> The kick_idle variable is no longer used, this commit therefore remove
> it and also remove associated code in the do_pick_task_scx().
>
> Fixes: 4c95380701f5 ("sched/ext: Fold balance_scx() into pick_task_scx()"),
nit: drop the comma at the end of the line.
Apart than that, looks good to me, thanks for the cleanup.
Reviewed-by: Andrea Righi <arighi@nvidia.com>
-Andrea
> Signed-off-by: Zqiang <qiang.zhang@linux.dev>
> ---
> kernel/sched/ext.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
> index 695503a2f7d1..94164f2dec6d 100644
> --- a/kernel/sched/ext.c
> +++ b/kernel/sched/ext.c
> @@ -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);
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] sched_ext: Remove unused code in the do_pick_task_scx()
2025-12-15 11:29 [PATCH] sched_ext: Remove unused code in the do_pick_task_scx() Zqiang
2025-12-15 13:58 ` Andrea Righi
@ 2025-12-15 15:05 ` Emil Tsalapatis
2025-12-15 15:06 ` Emil Tsalapatis
2025-12-15 15:57 ` Tejun Heo
2 siblings, 1 reply; 5+ messages in thread
From: Emil Tsalapatis @ 2025-12-15 15:05 UTC (permalink / raw)
To: Zqiang, tj, void, arighi, changwoo; +Cc: sched-ext, linux-kernel
On Mon Dec 15, 2025 at 6:29 AM EST, Zqiang wrote:
> The kick_idle variable is no longer used, this commit therefore remove
> it and also remove associated code in the do_pick_task_scx().
>
> Fixes: 4c95380701f5 ("sched/ext: Fold balance_scx() into pick_task_scx()"),
> Signed-off-by: Zqiang <qiang.zhang@linux.dev>
The change seems reasonable, but why is there a fixes up? This is
followup cleanup, the original patch is perfectly fine.
> ---
> kernel/sched/ext.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
> index 695503a2f7d1..94164f2dec6d 100644
> --- a/kernel/sched/ext.c
> +++ b/kernel/sched/ext.c
> @@ -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);
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] sched_ext: Remove unused code in the do_pick_task_scx()
2025-12-15 15:05 ` Emil Tsalapatis
@ 2025-12-15 15:06 ` Emil Tsalapatis
0 siblings, 0 replies; 5+ messages in thread
From: Emil Tsalapatis @ 2025-12-15 15:06 UTC (permalink / raw)
To: Emil Tsalapatis, Zqiang, tj, void, arighi, changwoo
Cc: sched-ext, linux-kernel
On Mon Dec 15, 2025 at 10:05 AM EST, Emil Tsalapatis wrote:
> On Mon Dec 15, 2025 at 6:29 AM EST, Zqiang wrote:
>> The kick_idle variable is no longer used, this commit therefore remove
>> it and also remove associated code in the do_pick_task_scx().
>>
>> Fixes: 4c95380701f5 ("sched/ext: Fold balance_scx() into pick_task_scx()"),
>> Signed-off-by: Zqiang <qiang.zhang@linux.dev>
>
> The change seems reasonable, but why is there a fixes up? This is
> followup cleanup, the original patch is perfectly fine.
>
Oh and of course tag aside:
Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com>
>> ---
>> kernel/sched/ext.c | 8 ++------
>> 1 file changed, 2 insertions(+), 6 deletions(-)
>>
>> diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
>> index 695503a2f7d1..94164f2dec6d 100644
>> --- a/kernel/sched/ext.c
>> +++ b/kernel/sched/ext.c
>> @@ -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);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sched_ext: Remove unused code in the do_pick_task_scx()
2025-12-15 11:29 [PATCH] sched_ext: Remove unused code in the do_pick_task_scx() Zqiang
2025-12-15 13:58 ` Andrea Righi
2025-12-15 15:05 ` Emil Tsalapatis
@ 2025-12-15 15:57 ` Tejun Heo
2 siblings, 0 replies; 5+ messages in thread
From: Tejun Heo @ 2025-12-15 15:57 UTC (permalink / raw)
To: Zqiang; +Cc: void, arighi, changwoo, sched-ext, linux-kernel, Emil Tsalapatis
Applied to sched_ext/for-6.19-fixes with the Fixes tag (and trailing comma)
dropped.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-12-15 15:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-15 11:29 [PATCH] sched_ext: Remove unused code in the do_pick_task_scx() Zqiang
2025-12-15 13:58 ` Andrea Righi
2025-12-15 15:05 ` Emil Tsalapatis
2025-12-15 15:06 ` Emil Tsalapatis
2025-12-15 15:57 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox