From: Cody P Schafer <cody@linux.vnet.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@redhat.com>, Paul Mackerras <paulus@samba.org>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
Linux PPC <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH v2 02/11] perf core: export swevent hrtimer helpers
Date: Thu, 27 Feb 2014 11:33:27 -0800 [thread overview]
Message-ID: <530F9307.40400@linux.vnet.ibm.com> (raw)
In-Reply-To: <20140226082943.GC18404@twins.programming.kicks-ass.net>
On 02/26/2014 12:29 AM, Peter Zijlstra wrote:
> On Tue, Feb 25, 2014 at 01:38:31PM -0800, Cody P Schafer wrote:
>> On 02/25/2014 02:20 AM, Peter Zijlstra wrote:
>>> On Tue, Feb 25, 2014 at 02:33:26PM +1100, Michael Ellerman wrote:
>>>> On Fri, 2014-14-02 at 22:02:06 UTC, Cody P Schafer wrote:
>>>>> Export the swevent hrtimer helpers currently only used in events/core.c
>>>>> to allow the addition of architecture specific sw-like pmus.
>>>>
>>>> Peter, Ingo, can we get your ACK on this please?
>>>
>>> How are they used? I saw some usage in patch 9 or so; but its not
>>> explained anywhere. All patches have non-existent Changelogs and the few
>>> comments that are there are pretty hardware specific.
>>>
>>> So please do tell; what do you need this for?
>>
>> From this patch's change log:
>>
>>> Export the swevent hrtimer helpers currently only used in events/core.c to allow the addition of architecture specific sw-like pmus.
>>
>> The key part here is "architecture specific sw-like pmus", where the
>> announcement explains why these pmus are sw-like:
>
> I don't read announcements for crucial patch details; announcements are
> lost and therefore unimportant.
And I'll be sure to elaborate further in the changelog next time (if I
don't drop this change entirely).
This is the first comment I've got on this particular patch.
>>> The counters supplied by these interfaces are continually counting and never
>>> need to be (and cannot be) disabled or enabled. They additionally do not
>>> generate any interrupts. This makes them in some regards similar to software
>>> counters, and as a result their implimentation shares some common code (which
>>> an initial patch exposes) with the sw counters.
>>
>> Essentially, these pmus just provide access to a big array of counters which
>> don't generate interrupts, and are all 64bit (and assumed to never
>> overflow). Rather than duplicate the code that we already have for managing
>> timing when reading from counters that don't have interrupts (the functions
>> that are exposed by this patch), I've reused it.
>
> So note that all the software counters generate interrupts in their own
> measuring domain. The hrtimer ones measure time and generate time based
> interrupts, the event based ones generate 'interrupts' on their events.
>
> What you have here is a hw pmu without interrupt capability. That's
> fine, they don't get to generate interrupt. We have plenty of those
> already.
>
> But what you propose to do is add interrupt in another domain entirely.
> That's not fine. Don't do that.
Ok, so it looks like I misunderstood the need for an interrupt. The
intention in using the swevent_hrtimer code was to enable setting up the
events as frequency sampled. After taking another look at the gpci and
24x7 pmus, I'm forbidding sampling events anyhow in event init, so the
timer code isn't even taken advantage of. I'll drop this patch in the
next set.
>
> You also try and conceal this information; so you suck.
>
next prev parent reply other threads:[~2014-02-27 19:33 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-14 22:02 [PATCH v2 00/11] powerpc: Add support for Power Hypervisor supplied performance counters Cody P Schafer
2014-02-14 22:02 ` [PATCH v2 01/11] perf: add PMU_RANGE_ATTR() helper for use by sw-like pmus Cody P Schafer
2014-02-25 3:33 ` Michael Ellerman
2014-02-25 20:33 ` Cody P Schafer
2014-02-25 22:19 ` Cody P Schafer
2014-02-14 22:02 ` [PATCH v2 02/11] perf core: export swevent hrtimer helpers Cody P Schafer
2014-02-25 3:33 ` Michael Ellerman
2014-02-25 10:20 ` Peter Zijlstra
2014-02-25 21:38 ` Cody P Schafer
2014-02-26 8:29 ` Peter Zijlstra
2014-02-27 19:33 ` Cody P Schafer [this message]
2014-02-14 22:02 ` [PATCH v2 03/11] sysfs: create bin_attributes under the requested group Cody P Schafer
2014-02-15 20:15 ` Greg Kroah-Hartman
2014-02-25 3:33 ` Michael Ellerman
2014-02-14 22:02 ` [PATCH v2 04/11] powerpc: add hvcalls for 24x7 and gpci (get performance counter info) Cody P Schafer
2014-02-25 3:33 ` Michael Ellerman
2014-02-25 21:13 ` Cody P Schafer
2014-02-14 22:02 ` [PATCH v2 05/11] powerpc: add hv_gpci interface header Cody P Schafer
2014-02-25 3:33 ` Michael Ellerman
2014-02-25 20:35 ` Cody P Schafer
2014-02-14 22:02 ` [PATCH v2 06/11] powerpc: add 24x7 " Cody P Schafer
2014-02-14 22:02 ` [PATCH v2 07/11] powerpc: add a shared interface to get gpci version and capabilities Cody P Schafer
2014-02-25 3:33 ` Michael Ellerman
2014-02-25 21:20 ` Cody P Schafer
2014-02-14 22:02 ` [PATCH v2 08/11] powerpc/perf: add support for the hv gpci (get performance counter info) interface Cody P Schafer
2014-02-25 3:33 ` Michael Ellerman
2014-02-25 21:25 ` Cody P Schafer
2014-02-14 22:02 ` [PATCH v2 09/11] powerpc/perf: add support for the hv 24x7 interface Cody P Schafer
2014-02-25 3:33 ` Michael Ellerman
2014-02-25 20:55 ` Cody P Schafer
2014-02-14 22:02 ` [PATCH v2 10/11] powerpc/perf: add kconfig option for hypervisor provided counters Cody P Schafer
2014-02-14 22:32 ` Scott Wood
2014-02-15 0:25 ` Cody P Schafer
2014-02-17 7:11 ` Michael Ellerman
2014-02-17 19:41 ` Cody P Schafer
2014-02-21 0:14 ` [PATCH v2.1 9/11] " Cody P Schafer
2014-02-21 0:24 ` Cody P Schafer
2014-02-25 3:33 ` [PATCH v2 10/11] " Michael Ellerman
2014-02-25 21:31 ` Cody P Schafer
2014-02-26 3:48 ` Michael Ellerman
2014-02-14 22:02 ` [PATCH v2 11/11] powerpc/perf/hv_{gpci, 24x7}: add documentation of device attributes Cody P Schafer
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=530F9307.40400@linux.vnet.ibm.com \
--to=cody@linux.vnet.ibm.com \
--cc=acme@ghostprotocols.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.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).