mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hongyan Xia <hongyan.xia2@arm.com>
To: Qais Yousef <qyousef@layalina.io>
Cc: Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Morten Rasmussen <morten.rasmussen@arm.com>,
	Lukasz Luba <lukasz.luba@arm.com>,
	Christian Loehle <christian.loehle@arm.com>,
	linux-kernel@vger.kernel.org, David Dai <davidai@google.com>,
	Saravana Kannan <saravanak@google.com>
Subject: Re: [RFC PATCH v2 0/7] uclamp sum aggregation
Date: Tue, 6 Feb 2024 17:32:42 +0000	[thread overview]
Message-ID: <1cc2b8c4-ea0e-4e98-a1a3-2916cccb1ab1@arm.com> (raw)
In-Reply-To: <20240206152054.k3uskf3rhd4icmzt@airbuntu>

On 06/02/2024 15:20, Qais Yousef wrote:
> On 02/01/24 13:11, Hongyan Xia wrote:
> 
>> [1]: https://lore.kernel.org/all/20230331014356.1033759-1-davidai@google.com/
> 
> Their solution is not acceptable for the same reason yours isn't. Saravana and
> David know this and we discussed at LPC. uclamp hints are limits and should not
> be summed.

Uclamp is a performance hint and nothing in its definition says it can't 
be summed. Clearly whether a uclamp approach should be taken should be 
determined by how well it works as a hint, not by how we calculate it. I 
would not say I want to reject max aggregation simply because it throws 
away all other uclamp values except the max. It's because I have real 
evaluation results showing sum aggregation works as a much better hint.

>> [2]: https://android.googlesource.com/kernel/gs/+/refs/heads/android-gs-raviole-5.10-android12-d1/drivers/soc/google/vh/kernel/sched/fair.c#510
> 
> I think I clarified several times so far that this is not related to uclamp.
> Could you please refrain from referring to it again in the future? This is
> misleading and neither helps your cause nor its cause. The fact that you're
> relating to it makes me very worried as both links demonstrate lack of
> understanding/confusion of what uclamp is supposed to be.

The intention of the code is irrelevant. What I'm talking about is what 
effect the code actually has. The fact that you keep thinking I don't 
understand what the code does even after me explaining "I know what the 
intention of the code is, I'm just talking about the actual effect of 
the code" is an even more worrying sign.

> Again, this solution is not acceptable and you're moving things in the wrong
> direction. We don't want to redesign what uclamp means, but fix some corner
> cases. And you're doing the former not the latter.

I'm saying max aggregation is not effective and proposing a more 
effective implementation. In fact, you have sent a series that removes 
max aggregation. Clearly that does not count as fixing corner cases but 
is actually a redesign, and I don't understand why you are allowed to do 
such things and I am not. Also, when something becomes harder and harder 
to fix, a redesign that solves all the problems is clearly justified.

What I can summarize from sum aggregation is:

Pros:
1. A more effective implementation, proven by evaluation numbers
2. Consuming the same or even less power in benchmarks
3. 350 lines of code in total, less than half of max aggregation
4. This series shows the entirety and effectiveness of sum aggregation, 
at this very moment, today. Max aggregation needs further filtering and 
load balancing patches which we have not seen yet.
5. Resolves the drawbacks from max aggregation (which you might say is 
the same as 4)
6. Significantly reduces uclamp overhead, no bucket operations

Cons:
1. should not be summed (although the scheduler used to sum up 
utilization and util_est sums up a processed PELT signal today)
2. Under-utilization case (which is a problem GROUP_THROTTLE also has, 
and can be worked around. Please, I know the intention of 
GROUP_THROTTLE, I'm just talking about its actual effects).

I don't see why the things I listed above is in the wrong direction.

  reply	other threads:[~2024-02-06 17:32 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-01 13:11 Hongyan Xia
2024-02-01 13:11 ` [RFC PATCH v2 1/7] Revert "sched/uclamp: Set max_spare_cap_cpu even if max_spare_cap is 0" Hongyan Xia
2024-03-19 15:34   ` Dietmar Eggemann
2024-03-19 17:05     ` Hongyan Xia
2024-02-01 13:11 ` [RFC PATCH v2 2/7] sched/uclamp: Track uclamped util_avg in sched_avg Hongyan Xia
2024-02-01 13:11 ` [RFC PATCH v2 3/7] sched/uclamp: Introduce root_cfs_util_uclamp for rq Hongyan Xia
2024-03-18 18:21   ` Dietmar Eggemann
2024-03-19 11:50     ` Hongyan Xia
2024-03-20 15:27       ` Dietmar Eggemann
2024-03-20 17:22         ` Hongyan Xia
2024-02-01 13:12 ` [RFC PATCH v2 4/7] sched/fair: Use CFS util_avg_uclamp for utilization and frequency Hongyan Xia
2024-03-15 12:31   ` Dietmar Eggemann
2024-03-15 19:47     ` Hongyan Xia
2024-02-01 13:12 ` [RFC PATCH v2 5/7] sched/fair: Massively simplify util_fits_cpu() Hongyan Xia
2024-02-01 13:12 ` [RFC PATCH v2 6/7] sched/uclamp: Remove all uclamp bucket logic Hongyan Xia
2024-02-01 13:12 ` [RFC PATCH v2 7/7] sched/uclamp: Simplify uclamp_eff_value() Hongyan Xia
2024-02-06 15:20 ` [RFC PATCH v2 0/7] uclamp sum aggregation Qais Yousef
2024-02-06 17:32   ` Hongyan Xia [this message]
2024-02-20 15:47     ` Qais Yousef
2024-02-20 22:42       ` Hongyan Xia
2024-02-12  9:16 ` Vincent Guittot
2024-02-12 13:56   ` Hongyan Xia

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=1cc2b8c4-ea0e-4e98-a1a3-2916cccb1ab1@arm.com \
    --to=hongyan.xia2@arm.com \
    --cc=christian.loehle@arm.com \
    --cc=davidai@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=mingo@redhat.com \
    --cc=morten.rasmussen@arm.com \
    --cc=peterz@infradead.org \
    --cc=qyousef@layalina.io \
    --cc=saravanak@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

all inboxes | Powered by JetHome®