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: <CABFh=a5Y8b9Ke2e=Cjdirjzz95bNEJf1SjEOtT3OVG8ZPPBk3w@mail.gmail.com>
Date: Mon, 10 Nov 2025 16:21:38 -0500
From: Emil Tsalapatis <linux-lists@...alapatis.com>
To: Tejun Heo <tj@...nel.org>
Cc: David Vernet <void@...ifault.com>, Andrea Righi <andrea.righi@...ux.dev>, 
	Changwoo Min <changwoo@...lia.com>, Dan Schatzberg <schatzberg.dan@...il.com>, 
	Emil Tsalapatis <etsal@...a.com>, sched-ext@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 01/14] sched_ext: Don't set ddsp_dsq_id during
 select_cpu in bypass mode

On Mon, Nov 10, 2025 at 3:56 PM Tejun Heo <tj@...nel.org> wrote:
>
> In the default CPU selection path used during bypass mode, select_task_rq_scx()
> sets p->scx.ddsp_dsq_id to SCX_DSQ_LOCAL to emulate direct dispatch. However,
> do_enqueue_task() ignores ddsp_dsq_id in bypass mode and queues to the global
> DSQ instead, rendering the setting unnecessary.
>
> Don't set ddsp_dsq_id from bypass. Just return the selected CPU, which has the
> effect of waking up the picked idle CPU. Later patches will implement per-CPU
> bypass DSQs to resolve this issue in a more proper way.
>
> v2: Removed incorrect bug fix claim about dangling ddsp_dsq_id triggering
>     WARN_ON_ONCE(). dispatch_enqueue() always clears ddsp_dsq_id even in bypass
>     mode (Andrea).
>
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Cc: Andrea Righi <andrea.righi@...ux.dev>
> ---

Reviewed-by: Emil Tsalapatis (Meta) <emil@...alapatis.com>

>  kernel/sched/ext.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
> index 652a364e9e4c..cf8d86a2585c 100644
> --- a/kernel/sched/ext.c
> +++ b/kernel/sched/ext.c
> @@ -2521,12 +2521,8 @@ static int select_task_rq_scx(struct task_struct *p, int prev_cpu, int wake_flag
>                 s32 cpu;
>
>                 cpu = scx_select_cpu_dfl(p, prev_cpu, wake_flags, NULL, 0);
> -               if (cpu >= 0) {
> -                       refill_task_slice_dfl(sch, p);
> -                       p->scx.ddsp_dsq_id = SCX_DSQ_LOCAL;
> -               } else {
> +               if (cpu < 0)
>                         cpu = prev_cpu;
> -               }
>                 p->scx.selected_cpu = cpu;
>
>                 if (rq_bypass)
> --
> 2.51.2
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ