All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: dev@codyps.com, Paul Mackerras <paulus@samba.org>,
	linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 1/4] perf: Add 'flags' parameter to pmu txn interfaces
Date: Tue, 17 Mar 2015 07:47:45 +0100	[thread overview]
Message-ID: <20150317064745.GL2896@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <1425458108-3341-2-git-send-email-sukadev@linux.vnet.ibm.com>

On Wed, Mar 04, 2015 at 12:35:05AM -0800, Sukadev Bhattiprolu wrote:
> In addition to using the transaction interface to schedule events
> on a PMU, we will use it to also read a group of counters at once.
> Accordingly, add a flags parameter to the transaction interfaces.
> The flags indicate wheether the transaction is to add events to
> the PMU (PERF_PMU_TXN_ADD) or to read the events PERF_PMU_TXN_READ.
> 
> Based on input from Peter Zijlstra.
> 
> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
> ---
>  arch/powerpc/perf/core-book3s.c  | 15 ++++++++++++---
>  arch/x86/kernel/cpu/perf_event.c | 15 ++++++++++++---
>  include/linux/perf_event.h       | 14 +++++++++++---
>  kernel/events/core.c             | 26 +++++++++++++++-----------
>  4 files changed, 50 insertions(+), 20 deletions(-)

s390 and sparc also implement the txn.

# git grep "\.start_txn"
arch/powerpc/perf/core-book3s.c:        .start_txn      = power_pmu_start_txn,
arch/s390/kernel/perf_cpum_cf.c:        .start_txn    = cpumf_pmu_start_txn,
arch/sparc/kernel/perf_event.c: .start_txn      = sparc_pmu_start_txn,
arch/x86/kernel/cpu/perf_event.c:       .start_txn              = x86_pmu_start_txn,

Also; you add the flag to all 3 calls; does it make sense to only pass
it to the first and save the txn type in the txn state itself? We could
add PERF_EVENT_TXN_READ for this..

WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <peterz@infradead.org>
To: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
	Paul Mackerras <paulus@samba.org>,
	dev@codyps.com, linux-kernel@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 1/4] perf: Add 'flags' parameter to pmu txn interfaces
Date: Tue, 17 Mar 2015 07:47:45 +0100	[thread overview]
Message-ID: <20150317064745.GL2896@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <1425458108-3341-2-git-send-email-sukadev@linux.vnet.ibm.com>

On Wed, Mar 04, 2015 at 12:35:05AM -0800, Sukadev Bhattiprolu wrote:
> In addition to using the transaction interface to schedule events
> on a PMU, we will use it to also read a group of counters at once.
> Accordingly, add a flags parameter to the transaction interfaces.
> The flags indicate wheether the transaction is to add events to
> the PMU (PERF_PMU_TXN_ADD) or to read the events PERF_PMU_TXN_READ.
> 
> Based on input from Peter Zijlstra.
> 
> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
> ---
>  arch/powerpc/perf/core-book3s.c  | 15 ++++++++++++---
>  arch/x86/kernel/cpu/perf_event.c | 15 ++++++++++++---
>  include/linux/perf_event.h       | 14 +++++++++++---
>  kernel/events/core.c             | 26 +++++++++++++++-----------
>  4 files changed, 50 insertions(+), 20 deletions(-)

s390 and sparc also implement the txn.

# git grep "\.start_txn"
arch/powerpc/perf/core-book3s.c:        .start_txn      = power_pmu_start_txn,
arch/s390/kernel/perf_cpum_cf.c:        .start_txn    = cpumf_pmu_start_txn,
arch/sparc/kernel/perf_event.c: .start_txn      = sparc_pmu_start_txn,
arch/x86/kernel/cpu/perf_event.c:       .start_txn              = x86_pmu_start_txn,

Also; you add the flag to all 3 calls; does it make sense to only pass
it to the first and save the txn type in the txn state itself? We could
add PERF_EVENT_TXN_READ for this..

  reply	other threads:[~2015-03-17  6:48 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-04  8:35 [PATCH 0/4] perf: Implement event group read using txn interface Sukadev Bhattiprolu
2015-03-04  8:35 ` Sukadev Bhattiprolu
2015-03-04  8:35 ` [PATCH 1/4] perf: Add 'flags' parameter to pmu txn interfaces Sukadev Bhattiprolu
2015-03-04  8:35   ` Sukadev Bhattiprolu
2015-03-17  6:47   ` Peter Zijlstra [this message]
2015-03-17  6:47     ` Peter Zijlstra
2015-03-26  4:00     ` Sukadev Bhattiprolu
2015-03-26  4:00       ` Sukadev Bhattiprolu
2015-03-04  8:35 ` [PATCH 2/4] perf: Split perf_event_read() and perf_event_count() Sukadev Bhattiprolu
2015-03-04  8:35   ` Sukadev Bhattiprolu
2015-03-04  8:35 ` [PATCH 3/4] perf: Add 'update' parameter to perf_event_read_value() Sukadev Bhattiprolu
2015-03-04  8:35   ` Sukadev Bhattiprolu
2015-03-17  6:54   ` Peter Zijlstra
2015-03-17  6:54     ` Peter Zijlstra
2015-03-04  8:35 ` [PATCH 4/4] perf/powerpc: Implement group_read() txn interface for 24x7 counters Sukadev Bhattiprolu
2015-03-04  8:35   ` Sukadev Bhattiprolu
2015-03-17  6:57   ` Peter Zijlstra
2015-03-17  6:57     ` Peter Zijlstra
2015-03-26  5:57     ` Sukadev Bhattiprolu
2015-03-26  5:57       ` Sukadev Bhattiprolu
2015-04-01 18:10       ` Peter Zijlstra
2015-04-01 18:10         ` Peter Zijlstra

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=20150317064745.GL2896@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=dev@codyps.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    --cc=sukadev@linux.vnet.ibm.com \
    /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.