Re: [PATCH 1/3] arm/pmu: Reject groups spanning multiple hardware PMUs

2015-03-10 Thread Peter Zijlstra
On Tue, Mar 10, 2015 at 03:36:08PM +, Mark Rutland wrote: > On the assumption that the patch is otherwise OK, how about the commit > message below? Yeah, that'll do fine. Thanks! -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to

Re: [PATCH 1/3] arm/pmu: Reject groups spanning multiple hardware PMUs

2015-03-10 Thread Mark Rutland
On Tue, Mar 10, 2015 at 12:53:51PM +, Peter Zijlstra wrote: > On Tue, Mar 10, 2015 at 12:05:21PM +, Mark Rutland wrote: > > On Tue, Mar 10, 2015 at 11:27:23AM +, Peter Zijlstra wrote: > > > On Mon, Mar 09, 2015 at 12:46:30PM +, Suzuki K. Poulose wrote: > > > > From: "Suzuki K.

Re: [PATCH 1/3] arm/pmu: Reject groups spanning multiple hardware PMUs

2015-03-10 Thread Mark Rutland
> I think we could still solve this problem by deferring the 'context' > validation to the core. The PMUs could validate the group, within its > context. i.e, if it can accommodate its events as a group, during > event_init. The problem we face now, is encountering an event from a > different

Re: [PATCH 1/3] arm/pmu: Reject groups spanning multiple hardware PMUs

2015-03-10 Thread Suzuki K. Poulose
On 10/03/15 13:00, Peter Zijlstra wrote: On Tue, Mar 10, 2015 at 01:53:51PM +0100, Peter Zijlstra wrote: It would be nicer if we could prevent this in the core so we're not reliant on every PMU driver doing the same verification. My initial thought was that seemed like unnecessary duplication

Re: [PATCH 1/3] arm/pmu: Reject groups spanning multiple hardware PMUs

2015-03-10 Thread Mark Rutland
> So the problem is that event_init() is what will return the pmu, so we > cannot make decisions on it until after that returns. I took a look into hacking something into perf_try_init_event, but it ends up duplicating all of the existing tests and looks really out of place. > Maybe we can pull

Re: [PATCH 1/3] arm/pmu: Reject groups spanning multiple hardware PMUs

2015-03-10 Thread Peter Zijlstra
On Tue, Mar 10, 2015 at 01:53:51PM +0100, Peter Zijlstra wrote: > > It would be nicer if we could prevent this in the core so we're not > > reliant on every PMU driver doing the same verification. My initial > > thought was that seemed like unnecessary duplication of the ctx checking > > above,

Re: [PATCH 1/3] arm/pmu: Reject groups spanning multiple hardware PMUs

2015-03-10 Thread Peter Zijlstra
On Tue, Mar 10, 2015 at 12:05:21PM +, Mark Rutland wrote: > On Tue, Mar 10, 2015 at 11:27:23AM +, Peter Zijlstra wrote: > > On Mon, Mar 09, 2015 at 12:46:30PM +, Suzuki K. Poulose wrote: > > > From: "Suzuki K. Poulose" > > > > > > Don't allow grouping hardware events from different

Re: [PATCH 1/3] arm/pmu: Reject groups spanning multiple hardware PMUs

2015-03-10 Thread Mark Rutland
On Tue, Mar 10, 2015 at 11:27:23AM +, Peter Zijlstra wrote: > On Mon, Mar 09, 2015 at 12:46:30PM +, Suzuki K. Poulose wrote: > > From: "Suzuki K. Poulose" > > > > Don't allow grouping hardware events from different PMUs > > (eg. CCI + CPU). > > Uhm, how does this work? If we have

Re: [PATCH 1/3] arm/pmu: Reject groups spanning multiple hardware PMUs

2015-03-10 Thread Suzuki K. Poulose
On 10/03/15 11:27, Peter Zijlstra wrote: On Mon, Mar 09, 2015 at 12:46:30PM +, Suzuki K. Poulose wrote: From: "Suzuki K. Poulose" Don't allow grouping hardware events from different PMUs (eg. CCI + CPU). Uhm, how does this work? If we have multiple hardware PMUs we'll stop scheduling

Re: [PATCH 1/3] arm/pmu: Reject groups spanning multiple hardware PMUs

2015-03-10 Thread Peter Zijlstra
On Mon, Mar 09, 2015 at 12:46:30PM +, Suzuki K. Poulose wrote: > From: "Suzuki K. Poulose" > > Don't allow grouping hardware events from different PMUs > (eg. CCI + CPU). Uhm, how does this work? If we have multiple hardware PMUs we'll stop scheduling events after the first failed event

Re: [PATCH 1/3] arm/pmu: Reject groups spanning multiple hardware PMUs

2015-03-10 Thread Mark Rutland
On Tue, Mar 10, 2015 at 11:27:23AM +, Peter Zijlstra wrote: On Mon, Mar 09, 2015 at 12:46:30PM +, Suzuki K. Poulose wrote: From: Suzuki K. Poulose suzuki.poul...@arm.com Don't allow grouping hardware events from different PMUs (eg. CCI + CPU). Uhm, how does this work? If we

Re: [PATCH 1/3] arm/pmu: Reject groups spanning multiple hardware PMUs

2015-03-10 Thread Suzuki K. Poulose
On 10/03/15 11:27, Peter Zijlstra wrote: On Mon, Mar 09, 2015 at 12:46:30PM +, Suzuki K. Poulose wrote: From: Suzuki K. Poulose suzuki.poul...@arm.com Don't allow grouping hardware events from different PMUs (eg. CCI + CPU). Uhm, how does this work? If we have multiple hardware PMUs

Re: [PATCH 1/3] arm/pmu: Reject groups spanning multiple hardware PMUs

2015-03-10 Thread Peter Zijlstra
On Mon, Mar 09, 2015 at 12:46:30PM +, Suzuki K. Poulose wrote: From: Suzuki K. Poulose suzuki.poul...@arm.com Don't allow grouping hardware events from different PMUs (eg. CCI + CPU). Uhm, how does this work? If we have multiple hardware PMUs we'll stop scheduling events after the first

Re: [PATCH 1/3] arm/pmu: Reject groups spanning multiple hardware PMUs

2015-03-10 Thread Suzuki K. Poulose
On 10/03/15 13:00, Peter Zijlstra wrote: On Tue, Mar 10, 2015 at 01:53:51PM +0100, Peter Zijlstra wrote: It would be nicer if we could prevent this in the core so we're not reliant on every PMU driver doing the same verification. My initial thought was that seemed like unnecessary duplication

Re: [PATCH 1/3] arm/pmu: Reject groups spanning multiple hardware PMUs

2015-03-10 Thread Peter Zijlstra
On Tue, Mar 10, 2015 at 12:05:21PM +, Mark Rutland wrote: On Tue, Mar 10, 2015 at 11:27:23AM +, Peter Zijlstra wrote: On Mon, Mar 09, 2015 at 12:46:30PM +, Suzuki K. Poulose wrote: From: Suzuki K. Poulose suzuki.poul...@arm.com Don't allow grouping hardware events from

Re: [PATCH 1/3] arm/pmu: Reject groups spanning multiple hardware PMUs

2015-03-10 Thread Peter Zijlstra
On Tue, Mar 10, 2015 at 01:53:51PM +0100, Peter Zijlstra wrote: It would be nicer if we could prevent this in the core so we're not reliant on every PMU driver doing the same verification. My initial thought was that seemed like unnecessary duplication of the ctx checking above, but if

Re: [PATCH 1/3] arm/pmu: Reject groups spanning multiple hardware PMUs

2015-03-10 Thread Mark Rutland
So the problem is that event_init() is what will return the pmu, so we cannot make decisions on it until after that returns. I took a look into hacking something into perf_try_init_event, but it ends up duplicating all of the existing tests and looks really out of place. Maybe we can pull out

Re: [PATCH 1/3] arm/pmu: Reject groups spanning multiple hardware PMUs

2015-03-10 Thread Mark Rutland
I think we could still solve this problem by deferring the 'context' validation to the core. The PMUs could validate the group, within its context. i.e, if it can accommodate its events as a group, during event_init. The problem we face now, is encountering an event from a different PMU,

Re: [PATCH 1/3] arm/pmu: Reject groups spanning multiple hardware PMUs

2015-03-10 Thread Peter Zijlstra
On Tue, Mar 10, 2015 at 03:36:08PM +, Mark Rutland wrote: On the assumption that the patch is otherwise OK, how about the commit message below? Yeah, that'll do fine. Thanks! -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to

Re: [PATCH 1/3] arm/pmu: Reject groups spanning multiple hardware PMUs

2015-03-10 Thread Mark Rutland
On Tue, Mar 10, 2015 at 12:53:51PM +, Peter Zijlstra wrote: On Tue, Mar 10, 2015 at 12:05:21PM +, Mark Rutland wrote: On Tue, Mar 10, 2015 at 11:27:23AM +, Peter Zijlstra wrote: On Mon, Mar 09, 2015 at 12:46:30PM +, Suzuki K. Poulose wrote: From: Suzuki K. Poulose