Re: [PATCH v3 7/8] perf: Define PMU_TXN_READ interface

2015-07-23 Thread Sukadev Bhattiprolu
Peter Zijlstra [pet...@infradead.org] wrote: | On Wed, Jul 22, 2015 at 04:19:16PM -0700, Sukadev Bhattiprolu wrote: | > Peter Zijlstra [pet...@infradead.org] wrote: | > | I've not woken up yet, and not actually fully read the email, but can | > | you stuff the entire above chunk inside the IPI? |

Re: [PATCH v3 7/8] perf: Define PMU_TXN_READ interface

2015-07-23 Thread Peter Zijlstra
On Wed, Jul 22, 2015 at 04:19:16PM -0700, Sukadev Bhattiprolu wrote: > Peter Zijlstra [pet...@infradead.org] wrote: > | I've not woken up yet, and not actually fully read the email, but can > | you stuff the entire above chunk inside the IPI? > | > | I think you could then actually optimize

Re: [PATCH v3 7/8] perf: Define PMU_TXN_READ interface

2015-07-23 Thread Sukadev Bhattiprolu
Peter Zijlstra [pet...@infradead.org] wrote: | On Wed, Jul 22, 2015 at 04:19:16PM -0700, Sukadev Bhattiprolu wrote: | Peter Zijlstra [pet...@infradead.org] wrote: | | I've not woken up yet, and not actually fully read the email, but can | | you stuff the entire above chunk inside the IPI? | |

Re: [PATCH v3 7/8] perf: Define PMU_TXN_READ interface

2015-07-23 Thread Peter Zijlstra
On Wed, Jul 22, 2015 at 04:19:16PM -0700, Sukadev Bhattiprolu wrote: Peter Zijlstra [pet...@infradead.org] wrote: | I've not woken up yet, and not actually fully read the email, but can | you stuff the entire above chunk inside the IPI? | | I think you could then actually optimize

Re: [PATCH v3 7/8] perf: Define PMU_TXN_READ interface

2015-07-22 Thread Sukadev Bhattiprolu
Peter Zijlstra [pet...@infradead.org] wrote: | I've not woken up yet, and not actually fully read the email, but can | you stuff the entire above chunk inside the IPI? | | I think you could then actually optimize __perf_event_read() as well, | because all these events should be on the same

Re: [PATCH v3 7/8] perf: Define PMU_TXN_READ interface

2015-07-22 Thread Sukadev Bhattiprolu
Peter Zijlstra [pet...@infradead.org] wrote: | I've not woken up yet, and not actually fully read the email, but can | you stuff the entire above chunk inside the IPI? | | I think you could then actually optimize __perf_event_read() as well, | because all these events should be on the same

Re: [PATCH v3 7/8] perf: Define PMU_TXN_READ interface

2015-07-21 Thread Peter Zijlstra
On Tue, Jul 21, 2015 at 06:50:45PM -0700, Sukadev Bhattiprolu wrote: > We are trying to use the following interface: > > start_txn(pmu, PERF_PMU_TXN_READ); > > perf_event_read(leader); > list_for_each(sibling, >sibling_list, group_entry) > perf_event_read(sibling)

Re: [PATCH v3 7/8] perf: Define PMU_TXN_READ interface

2015-07-21 Thread Sukadev Bhattiprolu
Peter Zijlstra [pet...@infradead.org] wrote: | On Tue, Jul 14, 2015 at 08:01:54PM -0700, Sukadev Bhattiprolu wrote: | > +/* | > + * Use the transaction interface to read the group of events in @leader. | > + * PMUs like the 24x7 counters in Power, can use this to queue the events | > + * in the

Re: [PATCH v3 7/8] perf: Define PMU_TXN_READ interface

2015-07-21 Thread Peter Zijlstra
On Tue, Jul 21, 2015 at 06:50:45PM -0700, Sukadev Bhattiprolu wrote: We are trying to use the following interface: start_txn(pmu, PERF_PMU_TXN_READ); perf_event_read(leader); list_for_each(sibling, leader-sibling_list, group_entry) perf_event_read(sibling)

Re: [PATCH v3 7/8] perf: Define PMU_TXN_READ interface

2015-07-21 Thread Sukadev Bhattiprolu
Peter Zijlstra [pet...@infradead.org] wrote: | On Tue, Jul 14, 2015 at 08:01:54PM -0700, Sukadev Bhattiprolu wrote: | +/* | + * Use the transaction interface to read the group of events in @leader. | + * PMUs like the 24x7 counters in Power, can use this to queue the events | + * in the

Re: [PATCH v3 7/8] perf: Define PMU_TXN_READ interface

2015-07-16 Thread Peter Zijlstra
On Tue, Jul 14, 2015 at 08:01:54PM -0700, Sukadev Bhattiprolu wrote: > +/* > + * Use the transaction interface to read the group of events in @leader. > + * PMUs like the 24x7 counters in Power, can use this to queue the events > + * in the ->read() operation and perform the actual read in

Re: [PATCH v3 7/8] perf: Define PMU_TXN_READ interface

2015-07-16 Thread Peter Zijlstra
On Tue, Jul 14, 2015 at 08:01:54PM -0700, Sukadev Bhattiprolu wrote: +/* + * Use the transaction interface to read the group of events in @leader. + * PMUs like the 24x7 counters in Power, can use this to queue the events + * in the -read() operation and perform the actual read in -commit_txn.

[PATCH v3 7/8] perf: Define PMU_TXN_READ interface

2015-07-14 Thread Sukadev Bhattiprolu
Define a new PERF_PMU_TXN_READ interface to read a group of counters at once. Note that we use this interface with all PMUs. PMUs that implement this interface use the ->read() operation to _queue_ the counters to be read and use ->commit_txn() to actually read all the queued counters at once.

[PATCH v3 7/8] perf: Define PMU_TXN_READ interface

2015-07-14 Thread Sukadev Bhattiprolu
Define a new PERF_PMU_TXN_READ interface to read a group of counters at once. Note that we use this interface with all PMUs. PMUs that implement this interface use the -read() operation to _queue_ the counters to be read and use -commit_txn() to actually read all the queued counters at once.