Linux Power Management development
 help / color / mirror / Atom feed
From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>,
	mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
	rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
	bristot@redhat.com, vschneid@redhat.com, rafael@kernel.org,
	viresh.kumar@linaro.org, qyousef@layalina.io,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Cc: lukasz.luba@arm.com, wyes.karny@amd.com, beata.michalska@arm.com
Subject: Re: [PATCH v2 1/2] sched/schedutil: rework performance estimation
Date: Thu, 2 Nov 2023 13:03:32 +0100	[thread overview]
Message-ID: <c9e89355-9503-4623-9320-e4a4f57dcd98@arm.com> (raw)
In-Reply-To: <20231026170913.32605-2-vincent.guittot@linaro.org>

On 26/10/2023 19:09, Vincent Guittot wrote:

[...]

> @@ -153,14 +152,38 @@ static unsigned int get_next_freq(struct sugov_policy *sg_policy,
>  	return cpufreq_driver_resolve_freq(policy, freq);
>  }
>  
> +unsigned long sugov_effective_cpu_perf(int cpu, unsigned long actual,
> +				 unsigned long min,
> +				 unsigned long max)
> +{
> +	unsigned long target;
> +	struct rq *rq = cpu_rq(cpu);
> +
> +	if (rt_rq_is_runnable(&rq->rt))
> +		return max;
> +
> +	/* Provide at least enough capacity for DL + IRQ */
> +	target = min;
> +
> +	actual = map_util_perf(actual);
> +	/* Actually we don't need to target the max performance */
> +	if (actual < max)
> +		max = actual;
> +
> +	/*
> +	 * Ensure at least minimum performance while providing more compute
> +	 * capacity when possible.
> +	 */
> +	return max(target, max);

The superfluous `unsigned long target` is still there?

  return max(min, max) is much cleaer.

[...]

  parent reply	other threads:[~2023-11-02 12:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-26 17:09 [PATCH v2 0/2] Rework interface between scheduler and schedutil governor Vincent Guittot
2023-10-26 17:09 ` [PATCH v2 1/2] sched/schedutil: rework performance estimation Vincent Guittot
2023-10-30 17:46   ` Lukasz Luba
2023-10-31  9:48     ` Vincent Guittot
2023-11-16 13:14       ` Lukasz Luba
2023-11-02 12:03   ` Dietmar Eggemann [this message]
2023-11-02 12:58     ` Vincent Guittot
2023-10-26 17:09 ` [PATCH v2 2/2] sched/schedutil: rework iowait boost Vincent Guittot

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=c9e89355-9503-4623-9320-e4a4f57dcd98@arm.com \
    --to=dietmar.eggemann@arm.com \
    --cc=beata.michalska@arm.com \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=qyousef@layalina.io \
    --cc=rafael@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=wyes.karny@amd.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