From: Peter Zijlstra <peterz@infradead.org>
To: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Ingo Molnar <mingo@kernel.org>,
Vincent Guittot <vincent.guittot@linaro.org>,
Qais Yousef <qyousef@layalina.io>,
Kajetan Puchalski <kajetan.puchalski@arm.com>,
Morten Rasmussen <morten.rasmussen@arm.com>,
Vincent Donnefort <vdonnefort@google.com>,
Quentin Perret <qperret@google.com>,
Abhijeet Dharmapurikar <adharmap@quicinc.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] sched/fair, cpufreq: Introduce 'runnable boosting'
Date: Sat, 13 May 2023 11:32:34 +0200 [thread overview]
Message-ID: <20230513093234.GB4253@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <251b524a-2c44-3892-1bae-03f879d6a64b@arm.com>
On Fri, May 12, 2023 at 04:39:51PM +0200, Dietmar Eggemann wrote:
> On 12/05/2023 13:22, Peter Zijlstra wrote:
> > On Fri, May 12, 2023 at 12:10:29PM +0200, Dietmar Eggemann wrote:
> >
> >> -static unsigned long cpu_util(int cpu, struct task_struct *p, int dst_cpu)
> >> +static unsigned long
> >> +cpu_util(int cpu, struct task_struct *p, int dst_cpu, int boost)
> >> {
> >> struct cfs_rq *cfs_rq = &cpu_rq(cpu)->cfs;
> >> unsigned long util = READ_ONCE(cfs_rq->avg.util_avg);
> >> + unsigned long runnable;
> >> +
> >> + runnable = boost ? READ_ONCE(cfs_rq->avg.runnable_avg) : 0;
> >> + util = max(util, runnable);
> >>
> > if (boost)
> > util = max(util, READ_ONCE(cfs_rq->avg.runnable_avg));
>
> I need the util_est = max(util_est, runnable) further down as well. Just
> want to fetch runnable only once.
Ah, fair enought; but still, please use a regular if().
next prev parent reply other threads:[~2023-05-13 9:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-12 10:10 [PATCH v2 0/2] sched: Consider CPU contention in frequency, EAS max util & load-balance busiest CPU selection Dietmar Eggemann
2023-05-12 10:10 ` [PATCH v2 1/2] sched/fair: Refactor CPU utilization functions Dietmar Eggemann
2023-05-12 10:10 ` [PATCH v2 2/2] sched/fair, cpufreq: Introduce 'runnable boosting' Dietmar Eggemann
2023-05-12 11:22 ` Peter Zijlstra
2023-05-12 14:39 ` Dietmar Eggemann
2023-05-13 9:32 ` Peter Zijlstra [this message]
2023-05-12 11:32 ` Peter Zijlstra
2023-05-12 14:39 ` Dietmar Eggemann
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=20230513093234.GB4253@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=adharmap@quicinc.com \
--cc=dietmar.eggemann@arm.com \
--cc=kajetan.puchalski@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=morten.rasmussen@arm.com \
--cc=qperret@google.com \
--cc=qyousef@layalina.io \
--cc=vdonnefort@google.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