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: <a20ccb66-0233-4e09-94cd-586133072c3c@arm.com>
Date: Wed, 30 Oct 2024 15:50:05 +0000
From: Christian Loehle <christian.loehle@....com>
To: Peter Zijlstra <peterz@...radead.org>, mingo@...nel.org
Cc: juri.lelli@...hat.com, vincent.guittot@...aro.org,
 dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
 mgorman@...e.de, vschneid@...hat.com, tj@...nel.org, void@...ifault.com,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/6] sched/ext: Fix scx vs sched_delayed

On 10/30/24 15:12, Peter Zijlstra wrote:
> Commit 98442f0ccd82 ("sched: Fix delayed_dequeue vs
> switched_from_fair()") forgot about scx :/
> 
> Fixes: 98442f0ccd82 ("sched: Fix delayed_dequeue vs switched_from_fair()")
> Reported-by: Tejun Heo <tj@...nel.org>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> Link: https://lkml.kernel.org/r/20241030104934.GK14555@noisy.programming.kicks-ass.net
> ---
>  kernel/sched/ext.c |   14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
> 
> --- a/kernel/sched/ext.c
> +++ b/kernel/sched/ext.c
> @@ -4489,11 +4489,16 @@ static void scx_ops_disable_workfn(struc
>  	scx_task_iter_start(&sti);
>  	while ((p = scx_task_iter_next_locked(&sti))) {
>  		const struct sched_class *old_class = p->sched_class;
> +		const struct sched_class *new_class =
> +			__setscheduler_class(p->policy, p->prio);
>  		struct sched_enq_and_set_ctx ctx;
>  
> +		if (old_class != new_class && p->se.sched_delayed)
> +			dequeue_task(task_rq(p), p, DEQUEUE_SLEEP | DEQUEUE_DELAYED);
> +
>  		sched_deq_and_put_task(p, DEQUEUE_SAVE | DEQUEUE_MOVE, &ctx);
>  
> -		p->sched_class = __setscheduler_class(p->policy, p->prio);
> +		p->sched_class = new_class;
>  		check_class_changing(task_rq(p), p, old_class);
>  
>  		sched_enq_and_set_task(&ctx);
> @@ -5199,12 +5204,17 @@ static int scx_ops_enable(struct sched_e
>  	scx_task_iter_start(&sti);
>  	while ((p = scx_task_iter_next_locked(&sti))) {
>  		const struct sched_class *old_class = p->sched_class;
> +		const struct sched_class *new_class =
> +			__setscheduler_class(p->policy, p->prio);
>  		struct sched_enq_and_set_ctx ctx;
>  
> +		if (old_class != new_class && p->se.sched_delayed)
> +			dequeue_task(task_rq(p), p, DEQUEUE_SLEEP | DEQUEE_DELAYED);
> +

s/DEQUEE_DELAYED/DEQUEUE_DELAYED
Anyway, no luck for me applying the series onto sched/core scx's for-next or rc5.
Any hint or do you mind supplying a branch?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ