From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: "mingo@redhat.com" <mingo@redhat.com>,
"vincent.guittot@linaro.org" <vincent.guittot@linaro.org>,
Morten Rasmussen <Morten.Rasmussen@arm.com>,
Chris Redpath <Chris.Redpath@arm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 0/8] change scheduler domain hierarchy set-up
Date: Mon, 06 Jan 2014 18:40:46 +0000 [thread overview]
Message-ID: <52CAF8AE.2060006@arm.com> (raw)
In-Reply-To: <20131220140046.GU16438@laptop.programming.kicks-ass.net>
On 20/12/13 14:00, Peter Zijlstra wrote:
> On Fri, Dec 13, 2013 at 12:11:20PM +0000, dietmar.eggemann@arm.com wrote:
>> From: Dietmar Eggemann <dietmar.eggemann@arm.com>
>>
>> This patch-set cleans up the scheduler domain level initialization code.
>> It is based on the idea of Peter Zijlstra to use a single scheduler domain
>> init function sketched here: https://lkml.org/lkml/2013/11/5/239
>>
>> What does the patch-set try to achieve:
>>
>> 1) Let the arch define the conventional (here defined to all levels except
>> the NUMA levels) scheduler domain hierarchy. The arch specifies per
>> scheduler domain the pointer to the getter function of the
>> corresponding cpu mask as well as the topology related scheduler
>> domain flags.
>>
>> 2) Unify the set-up code for conventional and NUMA scheduler domains.
>> All scheduler domain topology levels are now allocated in the same
>> function and the scheduler does not rely on a default scheduler
>> domain topology array any more. All scheduler domains now use a
>> common initialization function which makes the existing SD_FOO_INIT
>> macros redundant.
>
> Yeah, still a tad confused on what you did there, need to look in more
> detail.
I will come up w/ a V2 of this patch set. So don't worry to review this
bit. I just thought that we can unify the existing code in
sched_init_numa() function w/ the conventional sched domain set-up.
>
>> 3) The arch is no longer limited to the existing scheduler domain levels
>> (SMT, MC, BOOK, CPU) but can easily define additional levels.
>>
>> 4) Prepare the mechanics to make it easier to integrate the provision of
>> additional topology related data (e.g. energy information) to the
>> scheduler.
>
> Right, I was hoping you'd have a little more on that, but we'll get
> there I suppose ;-)
I still think that sd_energy will be an (optional) additional column in
xxx_topology[] (besides cpu mask func ptr and topology flags).
We're currently in the process of deriving something like this starting
from the use-cases described in Morten's email-set sent out on linux-pm
on 20/12/13 'Energy-aware scheduling use-cases and scheduler issues' via
an appropriate energy model.
The current patch set is more a preparation and clean-up exercise for
this so far.
>
>> Current limitations:
>>
>> 1) The arch interface for scheduler domain set-up is only implemented for
>> the ARM and the x86 arch and tested on an ARM TC2 (2 clusters, one with
>> 2 Cortex A15 and the other with 3 Cortex A7) and an Intel i5-520M (2
>> cores with 2 threads each) platform.
>>
>> 2) For other archs it has only been compile tested for certain
>> configurations (powerpc: chroma_defconfig, mips: ip27_defconfig,
>> s390: defconfig, tile: tilegx_defconfig). Obviously, linking these
>> kernels doesn't succeed due to the missing arch interface for
>> scheduler domain set-up implementation (undefined reference to
>> arch_sched_domain_info).
>>
>> 3) It does not delete the arch specific SD_FOO_INIT macros for ia64,
>> metag, s390 and tile arch.
>>
>> 4) It does not delete the arch_sd_sibling_asym_packing function which
>> will be redundant once the arch interface for scheduler domain set-up
>> has been implemented for powerpc arch.
>>
>> 5) There is no default set-up any more. Each arch has to define a
>> arch_sched_domain_info array, a circumstance which might not be
>> desirable.
>
> Yeah, that's sad, I think we want to keep the default thing to limit the
> amount of pointless duplication for all archs that are not special.
>
> Also, like you point out above, breaking all archs isn't nice :-)
>
Understood. V2 patch set will have a default set-up again.
>> 6) It has to be specified what happens when an arch specifies an
>> arch_sched_domain_info array with only a { NULL, } entry.
>
> Crash hard on boot :-) Although I suppose since its all compile time
> constants we could try and be smart and make the build fail somehow.
>
> The one thing I do dislike is that you mixed SDTL_flags and SD_flags
> into a single variable. Don't do that its bound to collide and give
> weird results at some point, and its not like any of these structures
> are space critical in any way shape or form.
Understood. Will change that.
-- Dietmar
>
prev parent reply other threads:[~2014-01-06 18:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-13 12:11 [RFC PATCH 0/8] change scheduler domain hierarchy set-up dietmar.eggemann
2013-12-13 12:11 ` [RFC PATCH 1/8] sched: arch interface for scheduler domain setup dietmar.eggemann
2013-12-13 12:11 ` [RFC PATCH 2/8] arm: implement " dietmar.eggemann
2013-12-13 12:11 ` [RFC PATCH 3/8] x86: " dietmar.eggemann
2013-12-13 12:11 ` [RFC PATCH 4/8] sched: allocate the entire topology array dynamically dietmar.eggemann
2013-12-13 12:11 ` [RFC PATCH 5/8] sched: introduce common topology level init function dietmar.eggemann
2013-12-20 14:04 ` Peter Zijlstra
2014-01-06 18:41 ` Dietmar Eggemann
2013-12-13 12:11 ` [RFC PATCH 6/8] sched: replace for_each_sd_topology with explicit for loop dietmar.eggemann
2013-12-13 12:11 ` [RFC PATCH 7/8] sched: replace topology level init func ptr with sd_init dietmar.eggemann
2013-12-13 12:11 ` [RFC PATCH 8/8] sched: remove scheduler domain naming dietmar.eggemann
2013-12-20 14:08 ` Peter Zijlstra
2014-01-06 18:41 ` Dietmar Eggemann
2014-01-07 10:22 ` Peter Zijlstra
2014-01-07 14:33 ` Dietmar Eggemann
2013-12-20 14:00 ` [RFC PATCH 0/8] change scheduler domain hierarchy set-up Peter Zijlstra
2014-01-06 18:40 ` Dietmar Eggemann [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=52CAF8AE.2060006@arm.com \
--to=dietmar.eggemann@arm.com \
--cc=Chris.Redpath@arm.com \
--cc=Morten.Rasmussen@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.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;
as well as URLs for NNTP newsgroup(s).