linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>,
	linux-s390 <linux-s390@vger.kernel.org>,
	"linux-kernel@vger.kernel.org >> Linux Kernel Mailing List" 
	<linux-kernel@vger.kernel.org>
Subject: Re: 4.7-rc1/s390: WARNING: CPU: 5 PID: 1 at kernel/events/core.c:8485 perf_pmu_register+0x420/0x428
Date: Mon, 6 Jun 2016 12:44:50 +0200	[thread overview]
Message-ID: <201606061045.u56AhkFw009429@mx0a-001b2d01.pphosted.com> (raw)
In-Reply-To: <20160606102900.GC30909@twins.programming.kicks-ass.net>

On 06/06/2016 12:29 PM, Peter Zijlstra wrote:
> On Mon, Jun 06, 2016 at 11:29:36AM +0200, Hendrik Brueckner wrote:
> 
>>>> Looks like perf_pmu_register does not like to be called twice (once for the counter
>>>> and once for the sampling facility).
>>>
>>> Twice isn't the problem per se, its trying to register two PMUs for
>>> perf_hw_context that is the problem.
>>>
>>> The perf core does not expect or deal well with that.
>>>
>>> The perf core expects a single HW PMU in that when it schedules
>>> hw_context events, and encounters an failure to pmu::add() (because the
>>> hw pmu is 'full') it stops trying to add more events.
>>
>> On s390, there are actually two distinct measurement facilities and, thus,
>> two HW PMUs for each.  There is the hardware counter and hardware sampling
>> facility/PMU.
> 
> Can you quickly describe the cf one; or provide a link to a document
> doing so?

http://www-01.ibm.com/support/docview.wss?uid=isg26fcd1cc32246f4c8852574ce0044734a

(or google for "The Load-Program-Parameter and the CPU-Measurement Facilities"
or SA23-2260)

 
> If this is a simple always running counter without interrupt you could
> make it a 'software' PMU which can always schedule, similar to the x86
> MSR driver (arch/x86/events/msr.c).

Its a bunch of counters for events like cache writes, cycles, instructions,
but Hendrik can probably better answer that specific question.

  reply	other threads:[~2016-06-06 10:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201606060737.u567YMPJ012970@mx0a-001b2d01.pphosted.com>
2016-06-06  8:21 ` 4.7-rc1/s390: WARNING: CPU: 5 PID: 1 at kernel/events/core.c:8485 perf_pmu_register+0x420/0x428 Peter Zijlstra
2016-06-06  9:29   ` Hendrik Brueckner
     [not found]   ` <201606060929.u569T8fW028400@mx0a-001b2d01.pphosted.com>
2016-06-06 10:29     ` Peter Zijlstra
2016-06-06 10:44       ` Christian Borntraeger [this message]
     [not found]       ` <201606061045.u56AiZQh023698@mx0a-001b2d01.pphosted.com>
2016-06-08  9:09         ` Hendrik Brueckner
2016-06-06  7:37 Christian Borntraeger

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=201606061045.u56AhkFw009429@mx0a-001b2d01.pphosted.com \
    --to=borntraeger@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=peterz@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).