All of lore.kernel.org
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 0/5] Cavium ThunderX uncore PMU support
Date: Tue, 26 Apr 2016 14:53:54 +0100	[thread overview]
Message-ID: <20160426135354.GR27312@arm.com> (raw)
In-Reply-To: <20160426120809.GA9796@hardcore>

On Tue, Apr 26, 2016 at 02:08:09PM +0200, Jan Glauber wrote:
> On Mon, Apr 25, 2016 at 02:19:07PM +0100, Will Deacon wrote:
> > On Mon, Apr 25, 2016 at 02:02:22PM +0200, Jan Glauber wrote:
> > > On Mon, Apr 25, 2016 at 12:22:07PM +0100, Will Deacon wrote:
> > > > On Mon, Apr 04, 2016 at 02:19:54PM +0200, Jan Glauber wrote:
> > > > > can you have a look at these patches?
> > > > 
> > > > Looks like Mark reviewed this last week -- are you planning to respin?
> > > 
> > > Yes, of course. I just had no time yet and I'm a bit lost on how to
> > > proceed without using the NUMA node information which Mark did not like
> > > to be used.
> > > 
> > > The only way to know which device is on which node would be to look
> > > at the PCI topology (which is also the source of the NUMA node_id).
> > > We could do this manually in order to not depend on CONFIG_NUMA,
> > > but I would like to know if that is acceptable before respinning the
> > > patches.
> > 
> > That doesn't feel like it really addresses Mark's concerns -- it's just
> > another way to get the information that isn't a first-class PMU topology
> > description from firmware.
> > 
> > Now, I don't actually mind using the NUMA topology so much in the cases
> > where it genuinely correlates with the PMU topology. My objection is more
> > that we end up sticking everything on node 0 if !CONFIG_NUMA, which could
> > result in working with an incorrect PMU topology and passing all of that
> > through to userspace.
> > 
> > So I'd prefer either making the driver depend on NUMA, or at the very least
> > failing to probe  the PMU if we discover a socketed system and NUMA is not
> > selected. Do either of those work as a compromise?
> > 
> > Will
> 
> That sounds like a good compromise.
> 
> So I could do the following:
> 
> 1) In the uncore setup check for CONFIG_NUMA, if set use the NUMA
>    information to determine the device node
> 
> 2) If CONFIG_NUMA is not set we check if we run on a socketed system
> 
>    a) In that case we return an error and give a message that CONFIG_NUMA needs
>       to be enabled
>    b) Otherwise we have a single node system and use node_id = 0

That sounds sensible to me. How do you "check if we run on a socketed
system"? My assumption would be that you could figure this out from the
firmware tables?

> David noted that it would also be possible to extract the node id from
> the physical address of the device, but I'm not sure that classifies as
> 'first-class' topology description...

I'd rather avoid this sort of probing, as it inevitably breaks when it
sees new hardware that doesn't follow the unwritten assumptions of the
old hardware.

Will

WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will.deacon@arm.com>
To: Jan Glauber <jan.glauber@caviumnetworks.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	David Daney <ddaney@caviumnetworks.com>
Subject: Re: [PATCH v2 0/5] Cavium ThunderX uncore PMU support
Date: Tue, 26 Apr 2016 14:53:54 +0100	[thread overview]
Message-ID: <20160426135354.GR27312@arm.com> (raw)
In-Reply-To: <20160426120809.GA9796@hardcore>

On Tue, Apr 26, 2016 at 02:08:09PM +0200, Jan Glauber wrote:
> On Mon, Apr 25, 2016 at 02:19:07PM +0100, Will Deacon wrote:
> > On Mon, Apr 25, 2016 at 02:02:22PM +0200, Jan Glauber wrote:
> > > On Mon, Apr 25, 2016 at 12:22:07PM +0100, Will Deacon wrote:
> > > > On Mon, Apr 04, 2016 at 02:19:54PM +0200, Jan Glauber wrote:
> > > > > can you have a look at these patches?
> > > > 
> > > > Looks like Mark reviewed this last week -- are you planning to respin?
> > > 
> > > Yes, of course. I just had no time yet and I'm a bit lost on how to
> > > proceed without using the NUMA node information which Mark did not like
> > > to be used.
> > > 
> > > The only way to know which device is on which node would be to look
> > > at the PCI topology (which is also the source of the NUMA node_id).
> > > We could do this manually in order to not depend on CONFIG_NUMA,
> > > but I would like to know if that is acceptable before respinning the
> > > patches.
> > 
> > That doesn't feel like it really addresses Mark's concerns -- it's just
> > another way to get the information that isn't a first-class PMU topology
> > description from firmware.
> > 
> > Now, I don't actually mind using the NUMA topology so much in the cases
> > where it genuinely correlates with the PMU topology. My objection is more
> > that we end up sticking everything on node 0 if !CONFIG_NUMA, which could
> > result in working with an incorrect PMU topology and passing all of that
> > through to userspace.
> > 
> > So I'd prefer either making the driver depend on NUMA, or at the very least
> > failing to probe  the PMU if we discover a socketed system and NUMA is not
> > selected. Do either of those work as a compromise?
> > 
> > Will
> 
> That sounds like a good compromise.
> 
> So I could do the following:
> 
> 1) In the uncore setup check for CONFIG_NUMA, if set use the NUMA
>    information to determine the device node
> 
> 2) If CONFIG_NUMA is not set we check if we run on a socketed system
> 
>    a) In that case we return an error and give a message that CONFIG_NUMA needs
>       to be enabled
>    b) Otherwise we have a single node system and use node_id = 0

That sounds sensible to me. How do you "check if we run on a socketed
system"? My assumption would be that you could figure this out from the
firmware tables?

> David noted that it would also be possible to extract the node id from
> the physical address of the device, but I'm not sure that classifies as
> 'first-class' topology description...

I'd rather avoid this sort of probing, as it inevitably breaks when it
sees new hardware that doesn't follow the unwritten assumptions of the
old hardware.

Will

  reply	other threads:[~2016-04-26 13:53 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09 16:21 [PATCH v2 0/5] Cavium ThunderX uncore PMU support Jan Glauber
2016-03-09 16:21 ` Jan Glauber
2016-03-09 16:21 ` [PATCH v2 1/5] arm64/perf: Basic uncore counter support for Cavium ThunderX Jan Glauber
2016-03-09 16:21   ` Jan Glauber
2016-04-19 15:06   ` Mark Rutland
2016-04-19 15:06     ` Mark Rutland
2016-04-20 12:29     ` Jan Glauber
2016-04-20 12:29       ` Jan Glauber
2016-03-09 16:21 ` [PATCH v2 2/5] arm64/perf: Cavium ThunderX L2C TAD uncore support Jan Glauber
2016-03-09 16:21   ` Jan Glauber
2016-04-19 15:43   ` Mark Rutland
2016-04-19 15:43     ` Mark Rutland
2016-03-09 16:21 ` [PATCH v2 3/5] arm64/perf: Cavium ThunderX L2C CBC " Jan Glauber
2016-03-09 16:21   ` Jan Glauber
2016-04-19 15:56   ` Mark Rutland
2016-04-19 15:56     ` Mark Rutland
2016-03-09 16:21 ` [PATCH v2 4/5] arm64/perf: Cavium ThunderX LMC " Jan Glauber
2016-03-09 16:21   ` Jan Glauber
2016-03-09 16:21 ` [PATCH v2 5/5] arm64/perf: Cavium ThunderX OCX TLK " Jan Glauber
2016-03-09 16:21   ` Jan Glauber
2016-04-04 12:19 ` [PATCH v2 0/5] Cavium ThunderX uncore PMU support Jan Glauber
2016-04-04 12:19   ` Jan Glauber
2016-04-25 11:22   ` Will Deacon
2016-04-25 11:22     ` Will Deacon
2016-04-25 12:02     ` Jan Glauber
2016-04-25 12:02       ` Jan Glauber
2016-04-25 13:19       ` Will Deacon
2016-04-25 13:19         ` Will Deacon
2016-04-26 12:08         ` Jan Glauber
2016-04-26 12:08           ` Jan Glauber
2016-04-26 13:53           ` Will Deacon [this message]
2016-04-26 13:53             ` Will Deacon
2016-04-27 10:51             ` Jan Glauber
2016-04-27 10:51               ` Jan Glauber
2016-04-27 11:18               ` Mark Rutland
2016-04-27 11:18                 ` Mark Rutland
     [not found] ` <CAEiAFz3eCsX3VoNus_Rq+En5zuB8fAxNCbC3ktw2NqLKwC=_kA@mail.gmail.com>
2016-04-19 10:35   ` Jan Glauber
2016-04-19 10:35     ` Jan Glauber
2016-04-19 16:03     ` Mark Rutland
2016-04-19 16:03       ` Mark Rutland
2016-06-28 10:24 ` Will Deacon
2016-06-28 10:24   ` Will Deacon
2016-06-28 14:04   ` Jan Glauber
2016-06-28 14:04     ` Jan Glauber
2016-07-04 10:11     ` Will Deacon
2016-07-04 10:11       ` Will Deacon
2016-09-16  7:55       ` Will Deacon
2016-09-16  7:55         ` Will Deacon
2016-09-16  8:39         ` Jan Glauber
2016-09-16  8:39           ` Jan Glauber

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=20160426135354.GR27312@arm.com \
    --to=will.deacon@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.