linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: morten.rasmussen@arm.com (Morten Rasmussen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/6] arm64: topology: Tell the scheduler about the relative power of cores
Date: Thu, 12 Dec 2013 11:56:40 +0000	[thread overview]
Message-ID: <20131212115639.GD28621@e103034-lin> (raw)
In-Reply-To: <alpine.LFD.2.10.1312111414500.15948@knanqh.ubzr>

On Wed, Dec 11, 2013 at 07:27:09PM +0000, Nicolas Pitre wrote:
> On Wed, 11 Dec 2013, Mark Brown wrote:
> 
> > On Wed, Dec 11, 2013 at 02:47:55PM +0000, Catalin Marinas wrote:
> > > On Wed, Dec 11, 2013 at 01:13:25PM +0000, Mark Brown wrote:
> > 
> > > > The power numbers are the same as for ARMv7 since it seems that the
> > > > expected differential between the big and little cores is very similar on
> > > > both ARMv7 and ARMv8.
> > 
> > > I have no idea ;). We don't have real silicon yet, so that's just a wild
> > > guess.
> > 
> > I was going on some typical DMIPS/MHz numbers that I'd found so
> > hopefully it's not a complete guess, though it will vary and that's just
> > one benchmark with all the realism problems that entails.  The ratio
> > seemed to be about the same as the equivalent for the ARMv7 cores so
> > given that it's a finger in the air thing it didn't seem worth drilling
> > down much further.
> > 
> > > > +static const struct cpu_efficiency table_efficiency[] = {
> > > > +	{ "arm,cortex-a57", 3891 },
> > > > +	{ "arm,cortex-a53", 2048 },
> > > > +	{ NULL, },
> > > > +};
> > 
> > > I also don't think we can just have absolute numbers here. I'm pretty
> > > sure these were generated on TC2 but other platforms may have different
> > > max CPU frequencies, memory subsystem, level and size of caches. The
> > > "average" efficiency and difference will be different.
> > 
> > The CPU frequencies at least are taken care of already, these numbers
> > get scaled for each core.  Once we're talking about things like the
> > memory I'd also start worrying about application specific effects.
> > There's also going to be stuff like thermal management which get fed in
> > here and which varies during runtime.
> > 
> > I don't know where the numbers came from for v7.

I'm fairly sure that they are guestimates based on TC2. Vincent should
know. I wouldn't consider them accurate in any way as the relative
performance varies wildly depending on the workload. However, they are
better than having no information at all.

> > 
> > > Can we define this via DT? It's a bit strange since that's a constant
> > > used by the Linux scheduler but highly related to hardware.
> > 
> > I really don't think that's a good idea at this point, it seems better
> > for the DT to stick to factual descriptions of what's present rather
> > than putting tuning numbers in there.  If the wild guesses are in the
> > kernel source it's fairly easy to improve them, if they're baked into
> > system DTs that becomes harder.
> 
> I really think putting such things into DT is wrong.
> 
> If those numbers were derived from benchmark results, then it is most 
> probably best to try to come up with some kind of equivalent benchmark 
> in the kernel to qualify CPUs at run time.  After all this is what 
> actually matters i.e. how CPUs perform relative to each other, and that 
> may vary with many factors that people will forget to update when 
> copying a DT content to enable a new board.
> 
> And that wouldn't be the first time some benchmark is used at boot time.  
> Different crypto/RAID algorithms are tested to determine the best one to 
> use, etc.
> 
> > I'm also worried about putting numbers into the DT now with all the
> > scheduler work going on, this time next year we may well have a
> > completely different idea of what we want to tell the scheduler.  It may
> > be that we end up being able to explicitly tell the scheduler about
> > things like the memory architecture, or that the scheduler just gets
> > smarter and can estimate all this stuff at runtime.  

I agree. We need to sort the scheduler side out first before we commit
to anything. If we are worried about including code into v8 that we are
going to change later, then it is probably better to leave this part
out. See my response to Mark's patch subset with the same patch for
details (I didn't see this thread until afterwardsi - sorry).

> 
> Exactly.  Which is why the kernel better be self-sufficient to determine 
> such params.  Dt should be used only for things that may not be probed 
> at run time.  The relative performance of a CPU certainly can be probed 
> at run time.
> 
> Obviously the specifics of the actual benchmark might be debated, but 
> the same can be said about static numbers.

Indeed.

Morten

  reply	other threads:[~2013-12-12 11:56 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-11 13:13 [PATCH 1/6] arm64: Add asm/cpu.h Mark Brown
2013-12-11 13:13 ` [PATCH 2/6] arm64: dts: Add a virtio disk to the RTSM motherboard Mark Brown
2013-12-11 13:13 ` [PATCH 3/6] arm64: dts: Add a devicetree for the ARMv8 4xA53 4xA57 FVP Mark Brown
2013-12-11 13:55   ` Mark Rutland
2013-12-11 14:11     ` Mark Brown
2013-12-11 15:04       ` Mark Rutland
2013-12-11 16:00         ` Mark Brown
2013-12-11 16:08         ` Jon Medhurst (Tixy)
2013-12-11 16:41           ` Ryan Harkin
2013-12-11 17:09             ` Mark Rutland
2013-12-11 17:50               ` Mark Brown
2013-12-11 13:13 ` [PATCH 4/6] arm64: topology: Implement basic CPU topology support Mark Brown
2013-12-11 14:12   ` Will Deacon
2013-12-11 14:15     ` Mark Brown
2013-12-11 14:24       ` Catalin Marinas
2013-12-11 14:30         ` Mark Brown
2013-12-11 14:49           ` Catalin Marinas
2013-12-11 16:13             ` Mark Brown
2013-12-12  6:59         ` Hanjun Guo
2013-12-12 10:27           ` Mark Brown
2013-12-12 11:22             ` Hanjun Guo
2013-12-16 10:57   ` Lorenzo Pieralisi
2013-12-16 11:33     ` Mark Brown
2013-12-16 12:29     ` Mark Brown
2013-12-16 14:46       ` Lorenzo Pieralisi
2013-12-16 15:12         ` Mark Brown
2013-12-17 11:47           ` Catalin Marinas
2013-12-17 12:17             ` Mark Brown
2013-12-16 14:45   ` Alex Shi
2013-12-16 15:22     ` Mark Brown
2013-12-17  7:19       ` Alex Shi
2013-12-17 12:02         ` Mark Brown
2013-12-11 13:13 ` [PATCH 5/6] arm64: topology: Tell the scheduler about the relative power of cores Mark Brown
2013-12-11 14:47   ` Catalin Marinas
2013-12-11 17:31     ` Mark Brown
2013-12-11 19:27       ` Nicolas Pitre
2013-12-12 11:56         ` Morten Rasmussen [this message]
2013-12-12 12:22           ` Mark Brown
2013-12-12 13:42             ` Morten Rasmussen
2013-12-12 14:26           ` Vincent Guittot
2013-12-11 13:13 ` [PATCH 6/6] arm64: dts: Add CPU topology properties for ARMv8 4xA53 4xA57 FVP Mark Brown
2013-12-11 14:10 ` [PATCH 1/6] arm64: Add asm/cpu.h Catalin Marinas
2013-12-11 14:23   ` Mark Brown
2013-12-11 14:27     ` Catalin Marinas
2013-12-12  6:50       ` Hanjun Guo
2013-12-12 10:36         ` Mark Rutland
2013-12-12 11:20           ` Hanjun Guo
  -- strict thread matches above, loose matches on Subject: below --
2014-05-02 20:38 [PATCH 0/6] arm64: topology: DT and MPIDR support Mark Brown
2014-05-02 20:38 ` [PATCH 5/6] arm64: topology: Tell the scheduler about the relative power of cores Mark Brown

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=20131212115639.GD28621@e103034-lin \
    --to=morten.rasmussen@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 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).