mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rohit Jain <rohit.k.jain@oracle.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, mingo@kernel.org,
	vincent.guittot@linaro.org, morten.rasmussen@arm.com,
	dietmar.eggemann@arm.com, Dhaval Giani <dhaval.giani@oracle.com>
Subject: Re: [PATCH] sched: Introduce scaled capacity awareness in enqueue
Date: Mon, 12 Jun 2017 17:31:04 -0700	[thread overview]
Message-ID: <b7ada82d-9d31-eb53-b638-4b89a410f9c9@oracle.com> (raw)
In-Reply-To: <20170612153634.eoj3khfbexbijcdp@hirez.programming.kicks-ass.net>

On 06/12/2017 08:36 AM, Peter Zijlstra wrote:

> On Mon, Jun 05, 2017 at 11:08:38AM -0700, Rohit Jain wrote:
>
>>> Why does determining if a CPU's capacity is scaled down need to involve
>>> global data? AFAICT its a purely CPU local affair.
>> The global array is used to determine the threshold capacity, so
>> that any CPU which lies below decides that a CPU is 'running low' on
>> available capacity. This threshold can also be statically defined to
>> be a fixed fraction, but having dynamic calculation to determine the
>> threshold works for all benchmarks.
>>
> What scenario is important for what workload?

The real workload which would give you the conditions is OLTP. In the
workload there is computation and synchronization and at the same
time interrupt activity is present as well. Different CPUs at different
time(s) have a lot of soft IRQ activity.

I simulated this by using a 'ping' which would generate IRQ activity in
the system, while the system had a barrier synchronization program. If
the threads end up on a CPU which has a 'lot' of soft IRQ activity,
then this delayed threads ends up delaying other threads as well.

Since in the real workload the interrupt activity keep changing we still
want to avoid, the 'really heavy' IRQ activity CPUs. In cases where all
the idle CPUs have similar scaled capacity available, we would end
up iterating over all the CPUs in the LLC domain to find the suitable
one.

> Thirdly, did you consider heterogeneous setups, where CPUs can have
> different capacities?

My assumption here is that we still want to choose the CPUs with higher
capacities. Please correct me if I am wrong here.

> And clearly you did not consider the 4K CPUs case, 4K cpus poking at a
> global data structure will completely come apart.

Since the global structure is only referred during load balancing, the
cost could (possibly) be OK?

>> Did you mean we should use a static cutoff and decide whether a CPU
>> should be treated low on capacity and skip it during idle CPU search?
> Yes. Why would that not suffice? You've not even begun to explain why
> you need all the additional complexity.

In cases where the IRQ activity is evenly spread out across all the CPUs
a fixed cutoff could cause us to iterate over the LLC scheduling domain.

I will test the 'static cutoff' changes against real workloads and send
v2 accordingly.

      reply	other threads:[~2017-06-13  0:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-22 20:48 Rohit Jain
2017-05-30 12:28 ` Peter Zijlstra
2017-05-31 22:19   ` Rohit Jain
2017-06-01 12:28     ` Peter Zijlstra
2017-06-01 12:37       ` Peter Zijlstra
2017-06-02 18:20         ` Rohit Jain
2017-06-02 18:26           ` Peter Zijlstra
2017-06-05 18:08             ` Rohit Jain
2017-06-12 15:36               ` Peter Zijlstra
2017-06-13  0:31                 ` Rohit Jain [this message]

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=b7ada82d-9d31-eb53-b638-4b89a410f9c9@oracle.com \
    --to=rohit.k.jain@oracle.com \
    --cc=dhaval.giani@oracle.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=morten.rasmussen@arm.com \
    --cc=peterz@infradead.org \
    --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®