public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Vernet <void@manifault.com>
To: Honglei Wang <jameshongleiwang@126.com>
Cc: tj@kernel.org, mingo@redhat.com, peterz@infradead.org,
	juri.lelli@redhat.com, vincent.guittot@linaro.org,
	dietmar.eggemann@arm.com, rostedt@goodmis.org,
	bsegall@google.com, mgorman@suse.de, vschneid@redhat.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched_ext: use correct function name in pick_task_scx() warning message
Date: Wed, 9 Oct 2024 12:01:47 -0500	[thread overview]
Message-ID: <20241009170147.GB11867@maniforge> (raw)
In-Reply-To: <20241009030602.91216-1-jameshongleiwang@126.com>

[-- Attachment #1: Type: text/plain, Size: 1917 bytes --]

On Wed, Oct 09, 2024 at 11:06:02AM +0800, Honglei Wang wrote:
> 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.
> 
> Signed-off-by: Honglei Wang <jameshongleiwang@126.com>
> ---
>  kernel/sched/ext.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
> index 410a4df8a121..22e18aec4ee1 100644
> --- a/kernel/sched/ext.c
> +++ b/kernel/sched/ext.c
> @@ -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:

diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index fe8acae35166..9fde2d3f8df5 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -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;

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  parent reply	other threads:[~2024-10-09 17:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-09  3:06 [PATCH] sched_ext: use correct function name in pick_task_scx() warning message Honglei Wang
2024-10-09 16:48 ` Tejun Heo
2024-10-09 17:01 ` David Vernet [this message]
2024-10-10  1:26   ` Honglei Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241009170147.GB11867@maniforge \
    --to=void@manifault.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=jameshongleiwang@126.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tj@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox