mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Dietmar Eggemann <dietmar.eggemann@arm.com>
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:41:49 +0100	[thread overview]
Message-ID: <20140319124149.GM27632@laptop.programming.kicks-ass.net> (raw)
In-Reply-To: <53297F10.3050106@arm.com>


The keyboard deity gave us delete, please apply graciously when replying
to large emails.

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.

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.

  reply	other threads:[~2014-03-19 12:42 UTC|newest]

Thread overview: 27+ 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 ` [PATCH v2 1/7] sched: remove unused SCHED_INIT_NODE Vincent Guittot
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-19  6:01   ` Preeti U Murthy
2014-03-19 11:27   ` Dietmar Eggemann
2014-03-19 12:41     ` Peter Zijlstra [this message]
2014-03-19 13:33       ` Vincent Guittot
2014-03-19 15:22         ` Dietmar Eggemann
2014-03-19 16:14           ` Vincent Guittot
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 ` [PATCH v2 4/7] sched: powerpc: " Vincent Guittot
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-19  6:21   ` Preeti U Murthy
2014-03-19  9:52     ` Vincent Guittot
2014-03-19 11:05       ` Preeti U Murthy
2014-03-19 12:26         ` Vincent Guittot
2014-03-19 11:59   ` Peter Zijlstra
2014-03-19 12:28     ` Vincent Guittot
2014-03-19 12:01   ` Peter Zijlstra
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 ` [PATCH v2 7/7] sched: powerpc: Add SD_SHARE_POWERDOMAIN for SMT level Vincent Guittot
2014-03-19 12:05   ` Peter Zijlstra
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=20140319124149.GM27632@laptop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=benh@kernel.crashing.org \
    --cc=cmetcalf@tilera.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=fenghua.yu@intel.com \
    --cc=james.hogan@imgtec.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mingo@kernel.org \
    --cc=preeti@linux.vnet.ibm.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=tony.luck@intel.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

Powered by JetHome