Skip to contentSkip to conversation

sched_ext: use correct function name in pick_task_scx() warning message

PATCH Applied Honglei Wang 3 participants 4 messages Oct 9, 2024 – Oct 10, 2024 Scheduler

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched_ext: use correct function name in pick_task_scx() warning message

pick_next_task_scx() was turned into pick_task_scx() since commit 753e2836d139 ("sched_ext: Unify regular and core-sched pick task paths"). Update the outdated message.

---
 kernel/sched/ext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/ext.c +1 -1
index 410a4df8a121..22e18aec4ee1 100644
@@ -2958,7 +2958,7 @@ static struct task_struct *pick_task_scx(struct rq *rq)
 
 		if (unlikely(!p->scx.slice)) {
 			if (!scx_rq_bypassing(rq) && !scx_warned_zero_slice) {
-				printk_deferred(KERN_WARNING "sched_ext: %s[%d] has zero slice in pick_next_task_scx()\n",
+				printk_deferred(KERN_WARNING "sched_ext: %s[%d] has zero slice in pick_task_scx()\n",
 						p->comm, p->pid);
 				scx_warned_zero_slice = true;
 			}
Signature · 1 line
2.24.3 (Apple Git-128)
Applied
#1 lore raw
Quoted 5 lines · Honglei Wang

pick_next_task_scx() was turned into pick_task_scx() since commit 753e2836d139 ("sched_ext: Unify regular and core-sched pick task paths"). Update the outdated message.

Applied to sched_ext/for-6.12-fixes.

Thanks.

Signature · 1 line
tejun
#2 lore raw
In reply to Honglei Wang
Quoted 14 lines · Honglei Wang

pick_next_task_scx() was turned into pick_task_scx() since commit 753e2836d139 ("sched_ext: Unify regular and core-sched pick task paths"). Update the outdated message.

---
 kernel/sched/ext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/ext.c +0 -0
index 410a4df8a121..22e18aec4ee1 100644

kernel/sched/ext.c static struct task_struct *pick_task_scx(struct rq *rq) · line 2961

Quoted 5 lines
kernel/sched/ext.c +1 -1
@@ -2958,7 +2958,7 @@ static struct task_struct *pick_task_scx(struct rq *rq)
 
 		if (unlikely(!p->scx.slice)) {
 			if (!scx_rq_bypassing(rq) && !scx_warned_zero_slice) {
-				printk_deferred(KERN_WARNING "sched_ext: %s[%d] has zero slice in pick_next_task_scx()\n",
+				printk_deferred(KERN_WARNING "sched_ext: %s[%d] has zero slice in pick_task_scx()\n",

Doesn't really matter much, but if we ever decide to touch this line again then something like this will be a bit more robust:

kernel/sched/ext.c +2 -2
index fe8acae35166..9fde2d3f8df5 100644
@@ -3020,8 +3020,8 @@ static struct task_struct *pick_task_scx(struct rq *rq)
 
                if (unlikely(!p->scx.slice)) {
                        if (!scx_rq_bypassing(rq) && !scx_warned_zero_slice) {
-                           printk_deferred(KERN_WARNING "sched_ext: %s[%d] has zero slice in pick_next_task_scx()\n",
-                                           p->comm, p->pid);
+                         printk_deferred(KERN_WARNING "sched_ext: %s[%d] has zero slice in %s()\n",
+                                         p->comm, p->pid, __func__);
                                scx_warned_zero_slice = true;
                        }
                        p->scx.slice = SCX_SLICE_DFL;
#3 lore raw
Quoted 16 lines · David Vernet
Quoted 15 lines · Honglei Wang

pick_next_task_scx() was turned into pick_task_scx() since commit 753e2836d139 ("sched_ext: Unify regular and core-sched pick task paths"). Update the outdated message.

---
 kernel/sched/ext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/ext.c +0 -0
index 410a4df8a121..22e18aec4ee1 100644
@@ -2958,7 +2958,7 @@ static struct task_struct *pick_task_scx(struct rq *rq)
 
Quoted 8 lines

kernel/sched/ext.c static struct task_struct *pick_task_scx(struct rq *rq)

Quoted 4 lines
kernel/sched/ext.c +1 -1
 		if (unlikely(!p->scx.slice)) {
 			if (!scx_rq_bypassing(rq) && !scx_warned_zero_slice) {
-				printk_deferred(KERN_WARNING "sched_ext: %s[%d] has zero slice in pick_next_task_scx()\n",
+				printk_deferred(KERN_WARNING "sched_ext: %s[%d] has zero slice in pick_task_scx()\n",

Doesn't really matter much, but if we ever decide to touch this line again then something like this will be a bit more robust:

Indeed, I'll send a v2 patch later.

Thanks,
Honglei

Quoted 15 lines
kernel/sched/ext.c +2 -2
index fe8acae35166..9fde2d3f8df5 100644
@@ -3020,8 +3020,8 @@ static struct task_struct *pick_task_scx(struct rq *rq)
 
                if (unlikely(!p->scx.slice)) {
                        if (!scx_rq_bypassing(rq) && !scx_warned_zero_slice) {
-                           printk_deferred(KERN_WARNING "sched_ext: %s[%d] has zero slice in pick_next_task_scx()\n",
-                                           p->comm, p->pid);
+                         printk_deferred(KERN_WARNING "sched_ext: %s[%d] has zero slice in %s()\n",
+                                         p->comm, p->pid, __func__);
                                scx_warned_zero_slice = true;
                        }
                        p->scx.slice = SCX_SLICE_DFL;