From: Peter Zijlstra <peterz@infradead.org>
To: Shrikanth Hegde <sshegde@linux.ibm.com>
Cc: juri.lelli@redhat.com, mingo@redhat.com,
vincent.guittot@linaro.org, linux-kernel@vger.kernel.org,
rostedt@goodmis.org, dietmar.eggemann@arm.com, nico@fluxnic.net
Subject: Re: [PATCH 1/2] sched/deadline: minor code cleanups
Date: Mon, 10 Nov 2025 15:10:38 +0100 [thread overview]
Message-ID: <20251110141038.GY3245006@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20251014100342.978936-2-sshegde@linux.ibm.com>
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@linux.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.
next prev parent reply other threads:[~2025-11-10 14:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-14 10:03 [PATCH 0/2] sched/deadline: minor code cleanups Shrikanth Hegde
2025-10-14 10:03 ` [PATCH 1/2] " Shrikanth Hegde
2025-11-10 14:10 ` Peter Zijlstra [this message]
2025-11-10 14:17 ` Peter Zijlstra
2025-11-11 11:37 ` [tip: sched/core] sched/deadline: Minor cleanup in select_task_rq_dl() tip-bot2 for Shrikanth Hegde
2025-11-11 16:33 ` tip-bot2 for Shrikanth Hegde
2025-10-14 10:03 ` [PATCH 2/2] sched/deadline: Use cpumask_weight_and in dl_bw_cpus Shrikanth Hegde
2025-11-10 14:11 ` Peter Zijlstra
2025-11-11 11:37 ` [tip: sched/core] sched/deadline: Use cpumask_weight_and() " tip-bot2 for Shrikanth Hegde
2025-11-11 16:33 ` tip-bot2 for Shrikanth Hegde
2025-10-15 8:41 ` [PATCH 0/2] sched/deadline: minor code cleanups Juri Lelli
2025-11-10 8:25 ` Shrikanth Hegde
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=20251110141038.GY3245006@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=nico@fluxnic.net \
--cc=rostedt@goodmis.org \
--cc=sshegde@linux.ibm.com \
--cc=vincent.guittot@linaro.org \
/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