lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241009170147.GB11867@maniforge>
Date: Wed, 9 Oct 2024 12:01:47 -0500
From: David Vernet <void@...ifault.com>
To: Honglei Wang <jameshongleiwang@....com>
Cc: tj@...nel.org, mingo@...hat.com, peterz@...radead.org,
	juri.lelli@...hat.com, vincent.guittot@...aro.org,
	dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
	mgorman@...e.de, vschneid@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched_ext: use correct function name in pick_task_scx()
 warning message

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@....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;

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ