From: dietmar.eggemann@arm.com (Dietmar Eggemann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/7] sched: rework of sched_domain topology definition
Date: Wed, 19 Mar 2014 13:46:51 +0000 [thread overview]
Message-ID: <53299FCB.1070109@arm.com> (raw)
In-Reply-To: <20140319124149.GM27632@laptop.programming.kicks-ass.net>
On 19/03/14 12:41, Peter Zijlstra wrote:
>
> The keyboard deity gave us delete, please apply graciously when replying
> to large emails.
Sorry about that, will do next time.
>
> On Wed, Mar 19, 2014 at 11:27:12AM +0000, Dietmar Eggemann wrote:
>> On 18/03/14 17:56, Vincent Guittot wrote:
>>> + if (sd->flags & SD_SHARE_CPUPOWER) {
>>> + sd->imbalance_pct = 110;
>>> + sd->smt_gain = 1178; /* ~15% */
>>> + sd->flags |= arch_sd_sibling_asym_packing();
>>> +
>>> + } else if (sd->flags & SD_SHARE_PKG_RESOURCES) {
>>> + sd->imbalance_pct = 117;
>>> + sd->cache_nice_tries = 1;
>>> + sd->busy_idx = 2;
>>> +
>>> +#ifdef CONFIG_NUMA
>>> + } else if (sd->flags & SD_NUMA) {
>>> + sd->cache_nice_tries = 2;
>>> + sd->busy_idx = 3;
>>> + sd->idle_idx = 2;
>>> +
>>> + sd->flags |= SD_SERIALIZE;
>>> + if (sched_domains_numa_distance[tl->numa_level] > RECLAIM_DISTANCE) {
>>> + sd->flags &= ~(SD_BALANCE_EXEC |
>>> + SD_BALANCE_FORK |
>>> + SD_WAKE_AFFINE);
>>> + }
>>> +
>>> +#endif
>>> + } else {
>>> + sd->flags |= SD_PREFER_SIBLING;
>>> + sd->cache_nice_tries = 1;
>>> + sd->busy_idx = 2;
>>> + sd->idle_idx = 1;
>>> + }
>>
>> This 'if ... else statement' is still a weak point from the perspective
>> of making the code robust:
>
> <snip>
>
>> Is there a way to check that MC and GMC have to have
>> SD_SHARE_PKG_RESOURCES set so that this can't happen unnoticed?
>
> So from the core codes perspective those names mean less than nothing.
> Its just a string to carry along for us meat-bags. The string isn't even
> there when !SCHED_DEBUG.
>
> So from this codes POV you told it it had a domain without PKGSHARE,
> that's fine.
I see your point. So what we want to avoid is to enable archs to create
different (per-cpu) set-ups inside a domain (as a specific set of cpu's
from a viewpoint of a cpu) but misconfiguration of the whole domain is a
different story. Got it!
>
> That said; yeah the thing isn't the prettiest piece of code. But it has
> the big advantage of being the one place where we convert topology into
> behaviour.
>
WARNING: multiple messages have this Message-ID (diff)
From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Vincent Guittot <vincent.guittot@linaro.org>,
"mingo@kernel.org" <mingo@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"preeti@linux.vnet.ibm.com" <preeti@linux.vnet.ibm.com>,
"tony.luck@intel.com" <tony.luck@intel.com>,
"fenghua.yu@intel.com" <fenghua.yu@intel.com>,
"schwidefsky@de.ibm.com" <schwidefsky@de.ibm.com>,
"james.hogan@imgtec.com" <james.hogan@imgtec.com>,
"cmetcalf@tilera.com" <cmetcalf@tilera.com>,
"benh@kernel.crashing.org" <benh@kernel.crashing.org>,
"linux@arm.linux.org.uk" <linux@arm.linux.org.uk>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linaro-kernel@lists.linaro.org" <linaro-kernel@lists.linaro.org>
Subject: Re: [PATCH v2 2/7] sched: rework of sched_domain topology definition
Date: Wed, 19 Mar 2014 13:46:51 +0000 [thread overview]
Message-ID: <53299FCB.1070109@arm.com> (raw)
In-Reply-To: <20140319124149.GM27632@laptop.programming.kicks-ass.net>
On 19/03/14 12:41, Peter Zijlstra wrote:
>
> The keyboard deity gave us delete, please apply graciously when replying
> to large emails.
Sorry about that, will do next time.
>
> On Wed, Mar 19, 2014 at 11:27:12AM +0000, Dietmar Eggemann wrote:
>> On 18/03/14 17:56, Vincent Guittot wrote:
>>> + if (sd->flags & SD_SHARE_CPUPOWER) {
>>> + sd->imbalance_pct = 110;
>>> + sd->smt_gain = 1178; /* ~15% */
>>> + sd->flags |= arch_sd_sibling_asym_packing();
>>> +
>>> + } else if (sd->flags & SD_SHARE_PKG_RESOURCES) {
>>> + sd->imbalance_pct = 117;
>>> + sd->cache_nice_tries = 1;
>>> + sd->busy_idx = 2;
>>> +
>>> +#ifdef CONFIG_NUMA
>>> + } else if (sd->flags & SD_NUMA) {
>>> + sd->cache_nice_tries = 2;
>>> + sd->busy_idx = 3;
>>> + sd->idle_idx = 2;
>>> +
>>> + sd->flags |= SD_SERIALIZE;
>>> + if (sched_domains_numa_distance[tl->numa_level] > RECLAIM_DISTANCE) {
>>> + sd->flags &= ~(SD_BALANCE_EXEC |
>>> + SD_BALANCE_FORK |
>>> + SD_WAKE_AFFINE);
>>> + }
>>> +
>>> +#endif
>>> + } else {
>>> + sd->flags |= SD_PREFER_SIBLING;
>>> + sd->cache_nice_tries = 1;
>>> + sd->busy_idx = 2;
>>> + sd->idle_idx = 1;
>>> + }
>>
>> This 'if ... else statement' is still a weak point from the perspective
>> of making the code robust:
>
> <snip>
>
>> Is there a way to check that MC and GMC have to have
>> SD_SHARE_PKG_RESOURCES set so that this can't happen unnoticed?
>
> So from the core codes perspective those names mean less than nothing.
> Its just a string to carry along for us meat-bags. The string isn't even
> there when !SCHED_DEBUG.
>
> So from this codes POV you told it it had a domain without PKGSHARE,
> that's fine.
I see your point. So what we want to avoid is to enable archs to create
different (per-cpu) set-ups inside a domain (as a specific set of cpu's
from a viewpoint of a cpu) but misconfiguration of the whole domain is a
different story. Got it!
>
> That said; yeah the thing isn't the prettiest piece of code. But it has
> the big advantage of being the one place where we convert topology into
> behaviour.
>
next prev parent reply other threads:[~2014-03-19 13:46 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-18 17:56 [PATCH v2 0/7] rework sched_domain topology description Vincent Guittot
2014-03-18 17:56 ` Vincent Guittot
2014-03-18 17:56 ` [PATCH v2 1/7] sched: remove unused SCHED_INIT_NODE Vincent Guittot
2014-03-18 17:56 ` Vincent Guittot
[not found] ` <1395165409-18055-2-git-send-email-vincent.guittot-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-03-19 11:07 ` James Hogan
2014-03-19 11:07 ` James Hogan
2014-03-19 11:07 ` James Hogan
2014-03-18 17:56 ` [PATCH v2 2/7] sched: rework of sched_domain topology definition Vincent Guittot
2014-03-18 17:56 ` Vincent Guittot
2014-03-19 6:01 ` Preeti U Murthy
2014-03-19 6:01 ` Preeti U Murthy
2014-03-19 11:27 ` Dietmar Eggemann
2014-03-19 11:27 ` Dietmar Eggemann
2014-03-19 12:41 ` Peter Zijlstra
2014-03-19 12:41 ` Peter Zijlstra
2014-03-19 13:33 ` Vincent Guittot
2014-03-19 13:33 ` Vincent Guittot
2014-03-19 15:22 ` Dietmar Eggemann
2014-03-19 15:22 ` Dietmar Eggemann
2014-03-19 16:14 ` Vincent Guittot
2014-03-19 16:14 ` Vincent Guittot
2014-03-19 13:46 ` Dietmar Eggemann [this message]
2014-03-19 13:46 ` Dietmar Eggemann
2014-03-18 17:56 ` [PATCH v2 3/7] sched: s390: create a dedicated topology table Vincent Guittot
2014-03-18 17:56 ` Vincent Guittot
2014-03-18 17:56 ` [PATCH v2 4/7] sched: powerpc: " Vincent Guittot
2014-03-18 17:56 ` Vincent Guittot
2014-03-19 6:04 ` Preeti U Murthy
2014-03-19 6:04 ` Preeti U Murthy
2014-03-18 17:56 ` [PATCH v2 5/7] sched: add a new SD_SHARE_POWERDOMAIN for sched_domain Vincent Guittot
2014-03-18 17:56 ` Vincent Guittot
2014-03-19 6:21 ` Preeti U Murthy
2014-03-19 6:21 ` Preeti U Murthy
2014-03-19 9:52 ` Vincent Guittot
2014-03-19 9:52 ` Vincent Guittot
2014-03-19 11:05 ` Preeti U Murthy
2014-03-19 11:05 ` Preeti U Murthy
2014-03-19 12:26 ` Vincent Guittot
2014-03-19 12:26 ` Vincent Guittot
2014-03-19 11:59 ` Peter Zijlstra
2014-03-19 11:59 ` Peter Zijlstra
2014-03-19 12:28 ` Vincent Guittot
2014-03-19 12:28 ` Vincent Guittot
2014-03-19 12:01 ` Peter Zijlstra
2014-03-19 12:01 ` Peter Zijlstra
2014-03-19 12:29 ` Vincent Guittot
2014-03-19 12:29 ` Vincent Guittot
2014-03-18 17:56 ` [PATCH v2 6/7] sched: ARM: create a dedicated scheduler topology table Vincent Guittot
2014-03-18 17:56 ` Vincent Guittot
2014-03-18 17:56 ` [PATCH v2 7/7] sched: powerpc: Add SD_SHARE_POWERDOMAIN for SMT level Vincent Guittot
2014-03-18 17:56 ` Vincent Guittot
2014-03-19 12:05 ` Peter Zijlstra
2014-03-19 12:05 ` Peter Zijlstra
2014-03-19 12:30 ` Vincent Guittot
2014-03-19 12:30 ` 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=53299FCB.1070109@arm.com \
--to=dietmar.eggemann@arm.com \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.