Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1440498
| Path | csiph.com!news.mixmin.net!aioe.org!news.servidellagleba.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Peter Zijlstra <peterz@infradead.org> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 07/13] sched/fair: Let asymmetric cpu configurations balance at wake-up |
| Date | Mon, 11 Jul 2016 13:20:02 +0200 |
| Message-ID | <rTHpM-6ib-23@gated-at.bofh.it> (permalink) |
| References | <rMTP3-6im-5@gated-at.bofh.it> <rMTP3-6im-17@gated-at.bofh.it> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.23.1 (2014-03-12) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 46 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | mingo@redhat.com, dietmar.eggemann@arm.com, yuyang.du@intel.com, vincent.guittot@linaro.org, mgalbraith@suse.de, linux-kernel@vger.kernel.org |
| X-Original-Date | Mon, 11 Jul 2016 13:13:44 +0200 |
| X-Original-Message-ID | <20160711111344.GO30909@twins.programming.kicks-ass.net> |
| X-Original-References | <1466615004-3503-1-git-send-email-morten.rasmussen@arm.com> <1466615004-3503-8-git-send-email-morten.rasmussen@arm.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1440498 |
Show key headers only | View raw
On Wed, Jun 22, 2016 at 06:03:18PM +0100, Morten Rasmussen wrote:
> Currently, SD_WAKE_AFFINE always takes priority over wakeup balancing if
> SD_BALANCE_WAKE is set on the sched_domains. For asymmetric
> configurations SD_WAKE_AFFINE is only desirable if the waking task's
> compute demand (utilization) is suitable for all the cpu capacities
> available within the SD_WAKE_AFFINE sched_domain. If not, let wakeup
> balancing take over (find_idlest_{group, cpu}()).
I think I tripped over this one the last time around, and I'm not sure
this Changelog is any clearer.
This is about the case where the waking cpu and prev_cpu are both in the
'wrong' cluster, right?
> This patch makes affine wake-ups conditional on whether both the waker
> cpu and prev_cpu has sufficient capacity for the waking task, or not.
>
> It is assumed that the sched_group(s) containing the waker cpu and
> prev_cpu only contain cpu with the same capacity (homogeneous).
>
> Ideally, we shouldn't set 'want_affine' in the first place, but we don't
> know if SD_BALANCE_WAKE is enabled on the sched_domain(s) until we start
> traversing them.
Is this again more fallout from that weird ASYM_CAP thing?
> +static int wake_cap(struct task_struct *p, int cpu, int prev_cpu)
> +{
> + long min_cap, max_cap;
> +
> + min_cap = min(capacity_orig_of(prev_cpu), capacity_orig_of(cpu));
> + max_cap = cpu_rq(cpu)->rd->max_cpu_capacity;
> +
> + /* Minimum capacity is close to max, no need to abort wake_affine */
> + if (max_cap - min_cap < max_cap >> 3)
> + return 0;
> +
> + return min_cap * 1024 < task_util(p) * capacity_margin;
> +}
I'm most puzzled by these inequalities, how, why ?
I would figure you'd compare task_util to the current remaining util of
the small group, and if it fits, place it there. This seems to do
something entirely different.
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH v2 07/13] sched/fair: Let asymmetric cpu configurations balance at wake-up Peter Zijlstra <peterz@infradead.org> - 2016-07-11 13:20 +0200 Re: [PATCH v2 07/13] sched/fair: Let asymmetric cpu configurations balance at wake-up Morten Rasmussen <morten.rasmussen@arm.com> - 2016-07-11 14:40 +0200
csiph-web