Re: [PATCH v4 05/12] arm-cci: PMU: Add support for transactions

2016-01-05 Thread Peter Zijlstra
On Tue, Jan 05, 2016 at 01:43:30PM +, Suzuki K. Poulose wrote: > On 05/01/16 13:37, Peter Zijlstra wrote: > >On Mon, Dec 21, 2015 at 10:55:29AM +, Suzuki K. Poulose wrote: > >>Thanks for that hint. Here is what I cam up with. We don't reschedule > >>the events, all we need to do is group th

Re: [PATCH v4 05/12] arm-cci: PMU: Add support for transactions

2016-01-05 Thread Suzuki K. Poulose
On 05/01/16 13:37, Peter Zijlstra wrote: On Mon, Dec 21, 2015 at 10:55:29AM +, Suzuki K. Poulose wrote: Thanks for that hint. Here is what I cam up with. We don't reschedule the events, all we need to do is group the writes to the counters. Hence we could as well add a flag for those events

Re: [PATCH v4 05/12] arm-cci: PMU: Add support for transactions

2016-01-05 Thread Peter Zijlstra
On Mon, Dec 21, 2015 at 10:55:29AM +, Suzuki K. Poulose wrote: > Thanks for that hint. Here is what I cam up with. We don't reschedule > the events, all we need to do is group the writes to the counters. Hence > we could as well add a flag for those events which need programming > and perform t

Re: [PATCH v4 05/12] arm-cci: PMU: Add support for transactions

2015-12-21 Thread Suzuki K. Poulose
On Fri, Dec 18, 2015 at 12:47:51PM +0100, Peter Zijlstra wrote: > On Fri, Dec 18, 2015 at 10:58:17AM +, Suzuki K. Poulose wrote: > > > We have a global Enable/Disable for CCI PMU and thats what we use > > currently. To be able to reprogram the counters with the event period > > (we program the

Re: [PATCH v4 05/12] arm-cci: PMU: Add support for transactions

2015-12-18 Thread Peter Zijlstra
On Fri, Dec 18, 2015 at 10:58:17AM +, Suzuki K. Poulose wrote: > We have a global Enable/Disable for CCI PMU and thats what we use > currently. To be able to reprogram the counters with the event period > (we program the counter with a specific count in pmu::start() and at > overflow irq handl

Re: [PATCH v4 05/12] arm-cci: PMU: Add support for transactions

2015-12-18 Thread Suzuki K. Poulose
On 18/12/15 10:42, Peter Zijlstra wrote: On Fri, Dec 18, 2015 at 10:28:23AM +, Suzuki K. Poulose wrote: On 17/12/15 18:42, Peter Zijlstra wrote: I thought about that, but was not sure if pmu->stop() is guaranteed to be called on all the events scheduled on the PMU when we pmu::pmu_disable().

Re: [PATCH v4 05/12] arm-cci: PMU: Add support for transactions

2015-12-18 Thread Peter Zijlstra
On Fri, Dec 18, 2015 at 10:28:23AM +, Suzuki K. Poulose wrote: > On 17/12/15 18:42, Peter Zijlstra wrote: > >The above doesn't look like it has a failure case, in which case you can > >achieve the same simpler, using pmu::pmu_{dis,en}able(). > > > > I thought about that, but was not sure if p

Re: [PATCH v4 05/12] arm-cci: PMU: Add support for transactions

2015-12-18 Thread Suzuki K. Poulose
On 17/12/15 18:42, Peter Zijlstra wrote: On Thu, Dec 17, 2015 at 05:49:12PM +, Suzuki K. Poulose wrote: We keep track of only the 'ADD' transactions. While we are in a transaction, we keep track of the indices allocated for the events and delay the following operations until the transaction

Re: [PATCH v4 05/12] arm-cci: PMU: Add support for transactions

2015-12-17 Thread Peter Zijlstra
On Thu, Dec 17, 2015 at 05:49:12PM +, Suzuki K. Poulose wrote: > This patch adds the transaction hooks for CCI PMU, which can be > later exploited to amortise the cost of writing the counters for > CCI-500 PMU. > > We keep track of only the 'ADD' transactions. While we are in a > transaction,

[PATCH v4 05/12] arm-cci: PMU: Add support for transactions

2015-12-17 Thread Suzuki K. Poulose
This patch adds the transaction hooks for CCI PMU, which can be later exploited to amortise the cost of writing the counters for CCI-500 PMU. We keep track of only the 'ADD' transactions. While we are in a transaction, we keep track of the indices allocated for the events and delay the following o