From: Ingo Molnar <mingo@kernel.org>
To: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Shrikanth Hegde <sshegde@linux.ibm.com>,
peterz@infradead.org, vincent.guittot@linaro.org,
qyousef@layalina.io, linux-kernel@vger.kernel.org,
vschneid@redhat.com, joshdon@google.com, riel@surriel.com
Subject: Re: [PATCH] sched/fair: Simplify continue_balancing for newidle
Date: Tue, 26 Mar 2024 20:15:55 +0100 [thread overview]
Message-ID: <ZgMe631rb2Iaw76t@gmail.com> (raw)
In-Reply-To: <6c1eed8f-455f-4612-be4e-02876f35e37e@arm.com>
* Dietmar Eggemann <dietmar.eggemann@arm.com> wrote:
> On 26/03/2024 10:00, Shrikanth Hegde wrote:
> >
> > On 3/26/24 1:37 PM, Ingo Molnar wrote:
> >>
> >> * Shrikanth Hegde <sshegde@linux.ibm.com> wrote:
> >>
>
> [...]
>
> >> Is this actually true? Any change to behavior invalidates such a sentence.
> >
> > From what i think, code path is same and I don't see any functionality changing.
> > Correct me if i am wrong.
> >
> > Currently, sched_balance_newidle does the same check to bail out as the
> > should_we_balance check in case of newidle. i.e
> >
> > should_we_balance
> > if (env->dst_rq->nr_running > 0 || env->dst_rq->ttwu_pending)
> > return 0;
> >
> > sched_balance_newidle
> > if (pulled_task || this_rq->nr_running > 0 ||
> > this_rq->ttwu_pending)
> > break;
> > }
>
> LGTM. Commit 792b9f65a568 ("sched: Allow newidle balancing to bail out
> of load_balance") (Jun 22) made sure that we leave sched_balance_rq()
> (former load_balance()) for CPU_NEWLY_IDLE asap to reduce wakeup latency.
>
> So IMHO, we can use 'continue_balancing' instead of 'this_rq->nr_running
> > 0 || this_rq->ttwu_pending' in sched_balance_newidle() (former
> newidle_balance()).
>
> Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Thanks for the clarification, applied!
Ingo
next prev parent reply other threads:[~2024-03-26 19:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-25 15:39 [PATCH] sched/fair: Simplify continue_balancing for newidle Shrikanth Hegde
2024-03-26 8:07 ` Ingo Molnar
2024-03-26 9:00 ` Shrikanth Hegde
2024-03-26 15:11 ` Dietmar Eggemann
2024-03-26 19:15 ` Ingo Molnar [this message]
2024-03-26 19:24 ` [tip: sched/core] sched/fair: Simplify the continue_balancing logic in sched_balance_newidle() tip-bot2 for 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=ZgMe631rb2Iaw76t@gmail.com \
--to=mingo@kernel.org \
--cc=dietmar.eggemann@arm.com \
--cc=joshdon@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=qyousef@layalina.io \
--cc=riel@surriel.com \
--cc=sshegde@linux.ibm.com \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/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