public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
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 15:22:39 +0000	[thread overview]
Message-ID: <5329B63F.9090800@arm.com> (raw)
In-Reply-To: <CAKfTPtDF27X_QJAYEdkb3q6HbULeT4N9t+ChDpdWST+15sndOw@mail.gmail.com>

On 19/03/14 13:33, Vincent Guittot wrote:
[...]

>>> 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.
> 
> We might add a check of the child in sd_init to ensure that the child
> has at least some properties of the current level.
> I mean that if a level has got the SD_SHARE_PKG_RESOURCES flag, its
> child must also have it. The same for SD_SHARE_CPUPOWER and
> SD_ASYM_PACKING.
> 
> so we can add something like the below in sd_init
> 
> child_flags = SD_SHARE_PKG_RESOURCES | SD_SHARE_CPUPOWER | SD_ASYM_PACKING
> flags = sd->flags & child_flags
> if (sd->child)
>    child_flags &= sd->child->flags
> child_flags &= flags
> if (flags != child_flags)
>     pr_info("The topology description looks strange \n");

I tried it with my faulty set-up on TC2 and I get the info message for
the GMC level for all CPU's in sd_init.

I had to pass an 'struct sched_domain *child' pointer into sd_init()
from build_sched_domain() because inside sd_init() sd->child is always NULL.

So one of the requirements of this approach is that a child level like
GMC (which could potentially replace its parent level or otherwise is
destroyed itself) has to specify all flags of its parent level (MC)?

What about SD_NUMA in child_flags? SD_ASYM_PACKING is also a little bit
different than SD_SHARE_PKG_RESOURCES or SD_SHARE_CPUPOWER because it's
not used in the if ... else statement.

But I'm afraid this only works for this specific case of the MC/GMC
layer and is not scalable. If sd->child is a level for which you don't
want to potentially destroy itself or its parent, then you would get
false alarms. IMHO, sd_init() has no information for which pair of
adjacent levels it should apply this check and for which not. Do I miss
something here?

-- Dietmar

> 
> Vincent
> 

  reply	other threads:[~2014-03-19 15:22 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
2014-03-19 13:33       ` Vincent Guittot
2014-03-19 15:22         ` Dietmar Eggemann [this message]
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=5329B63F.9090800@arm.com \
    --to=dietmar.eggemann@arm$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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