mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Valentin Schneider <valentin.schneider@arm.com>
To: Dietmar Eggemann <dietmar.eggemann@arm.com>,
	linux-kernel@vger.kernel.org
Cc: mingo@redhat.com, peterz@infradead.org,
	vincent.guittot@linaro.org, morten.rasmussen@arm.com,
	qperret@google.com, adharmap@codeaurora.org
Subject: Re: [PATCH v3 1/3] sched/fair: Add asymmetric CPU capacity wakeup scan
Date: Wed, 29 Jan 2020 12:10:55 +0000	[thread overview]
Message-ID: <40bfa77b-b695-5f53-848a-b72b67b33d69@arm.com> (raw)
In-Reply-To: <a2f9e7d1-08c6-2545-2088-e0226ffd79e0@arm.com>

On 29/01/2020 11:04, Dietmar Eggemann wrote:
>> +		/*
>> +		 * It would be silly to keep looping when we've found a CPU
>> +		 * of highest available capacity. Just check that it's not been
>> +		 * too pressured lately.
>> +		 */
>> +		if (rq->cpu_capacity_orig == READ_ONCE(rq->rd->max_cpu_capacity) &&
> 
> There is a similar check in check_misfit_status(). Common helper function?

Mright, and check_misfit_status() is missing the READ_ONCE(). That said...

> 
>> +		    !check_cpu_capacity(rq, sd))
>> +			return cpu;
> 
> I wonder how this special treatment of a big CPU behaves in (LITTLE,
> medium, big) system like Pixel4 (Snapdragon 855):
> 
>  flame:/ $ cat /sys/devices/system/cpu/cpu*/cpu_capacity
> 
> 261
> 261
> 261
> 261
> 871
> 871
> 871
> 1024
> 
> Or on legacy systems where the sd->imbalance_pct is 25% instead of 17%?
> 

... This is a very valid point. When I wrote this bit I had the good old
big.LITTLE split in mind where there are big differences between the capacity
values. As you point out, that's not so true with DynamIQ systems sporting
> 2 capacity values. The issue here is that we could bail early picking a
(slightly) pressured big (1024 capacity_orig) when there was a non-pressured
idle medium (871 capacity orig).

It's borderline in this example - the threshold for a big to be seen as
pressured by check_cpu_capacity(), assuming a flat topology with just an MC
domain, is ~ 875. If we have e.g. mediums at 900 and bigs at 1024, this
logic is broken.

So this is pretty much a case of my trying to be too clever for my own good,
I'll remove that "fastpath" in v4. Thanks for pointing it out!

  reply	other threads:[~2020-01-29 12:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-26 20:09 [PATCH v3 0/3] sched/fair: Capacity aware wakeup rework Valentin Schneider
2020-01-26 20:09 ` [PATCH v3 1/3] sched/fair: Add asymmetric CPU capacity wakeup scan Valentin Schneider
2020-01-28  6:22   ` Pavan Kondeti
2020-01-28 11:30     ` Valentin Schneider
2020-01-29  3:52       ` Pavan Kondeti
2020-01-29  8:16         ` Qais Yousef
2020-01-29  9:25         ` Valentin Schneider
2020-01-29 10:38       ` Dietmar Eggemann
2020-01-29 12:10         ` Valentin Schneider
2020-01-29 11:04   ` Dietmar Eggemann
2020-01-29 12:10     ` Valentin Schneider [this message]
2020-01-26 20:09 ` [PATCH v3 2/3] sched/topology: Remove SD_BALANCE_WAKE on asymmetric capacity systems Valentin Schneider
2020-01-29 16:27   ` Dietmar Eggemann
2020-01-30 11:06     ` Valentin Schneider
2020-01-26 20:09 ` [PATCH v3 3/3] sched/fair: Kill wake_cap() Valentin Schneider
2020-01-28  9:24 ` [PATCH v3 0/3] sched/fair: Capacity aware wakeup rework Dietmar Eggemann
2020-01-28 11:34   ` Valentin Schneider

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=40bfa77b-b695-5f53-848a-b72b67b33d69@arm.com \
    --to=valentin.schneider@arm.com \
    --cc=adharmap@codeaurora.org \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=morten.rasmussen@arm.com \
    --cc=peterz@infradead.org \
    --cc=qperret@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®