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: <20251110141038.GY3245006@noisy.programming.kicks-ass.net>
Date: Mon, 10 Nov 2025 15:10:38 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Shrikanth Hegde <sshegde@...ux.ibm.com>
Cc: juri.lelli@...hat.com, mingo@...hat.com, vincent.guittot@...aro.org,
	linux-kernel@...r.kernel.org, rostedt@...dmis.org,
	dietmar.eggemann@....com, nico@...xnic.net
Subject: Re: [PATCH 1/2] sched/deadline: minor code cleanups

On Tue, Oct 14, 2025 at 03:33:41PM +0530, Shrikanth Hegde wrote:
> - In dl_server_timer, there is same dl_runtime check above. So
> this check is duplicate. This could save a few cycles.
> 
> - In select_task_rq_dl, there is only one goto statement, there is
> no need for it. 
> 
> No functional changes.
> 
> Signed-off-by: Shrikanth Hegde <sshegde@...ux.ibm.com>
> ---
>  kernel/sched/deadline.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> index 7b7671060bf9..8b7c4ee41fd8 100644
> --- a/kernel/sched/deadline.c
> +++ b/kernel/sched/deadline.c
> @@ -1166,9 +1166,6 @@ static enum hrtimer_restart dl_server_timer(struct hrtimer *timer, struct sched_
>  		sched_clock_tick();
>  		update_rq_clock(rq);
>  
> -		if (!dl_se->dl_runtime)
> -			return HRTIMER_NORESTART;
> -
>  		if (dl_se->dl_defer_armed) {
>  			/*
>  			 * First check if the server could consume runtime in background.

That one got lost here:

  https://lkml.kernel.org/r/20251020141130.GJ3245006@noisy.programming.kicks-ass.net

> @@ -2173,7 +2170,7 @@ select_task_rq_dl(struct task_struct *p, int cpu, int flags)
>  	struct rq *rq;
>  
>  	if (!(flags & WF_TTWU))
> -		goto out;
> +		return cpu;
>  
>  	rq = cpu_rq(cpu);
>  
> @@ -2211,7 +2208,6 @@ select_task_rq_dl(struct task_struct *p, int cpu, int flags)
>  	}
>  	rcu_read_unlock();
>  
> -out:
>  	return cpu;
>  }

And this is completely different code, which would suggest it ought to
have been a separate patch.

But yeah, that makes sense.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ