Re: [RFC] Sharing PMU counters across compatible events

2017-12-13 Thread Tejun Heo
Hello, Peter. On Tue, Dec 12, 2017 at 11:37:36PM +0100, Peter Zijlstra wrote: > That would be a fairly massive change from how perf works today. And the > obvious pain point would be changing the per-cpu event set, which would > mean recomputing all possible combinations of task sets. > > Also no

Re: [RFC] Sharing PMU counters across compatible events

2017-12-13 Thread Tejun Heo
Hello, Jiri. On Wed, Dec 13, 2017 at 11:18:07AM +0100, Jiri Olsa wrote: > so I can see this to be useful for HW conters only, because > of limited number of regs > > as for the higher level on which this could be implemented I > see some pitfals with event rotations as Peter mentioned and > task/

Re: [RFC] Sharing PMU counters across compatible events

2017-12-13 Thread Jiri Olsa
On Mon, Dec 11, 2017 at 07:34:49AM -0800, Tejun Heo wrote: > Hello, Jiri. > > On Wed, Dec 06, 2017 at 12:42:04PM +0100, Jiri Olsa wrote: > > I see this rather on the hw level, since it concerns HW counters > > > > I think we could detect same (alias) events at the time counters > > are added/remo

Re: [RFC] Sharing PMU counters across compatible events

2017-12-12 Thread Peter Zijlstra
On Mon, Dec 11, 2017 at 07:47:44AM -0800, Tejun Heo wrote: > Hello, Peter. > > On Wed, Dec 06, 2017 at 01:35:00PM +0100, Peter Zijlstra wrote: > > On Fri, Dec 01, 2017 at 06:19:50AM -0800, Tejun Heo wrote: > > > > > What do you think? Would this be something worth pursuing? > > > > My worry wit

Re: [RFC] Sharing PMU counters across compatible events

2017-12-11 Thread Tejun Heo
Hello, Peter. On Wed, Dec 06, 2017 at 01:35:00PM +0100, Peter Zijlstra wrote: > On Fri, Dec 01, 2017 at 06:19:50AM -0800, Tejun Heo wrote: > > > What do you think? Would this be something worth pursuing? > > My worry with the whole thing is that it makes PMU scheduling _far_ more > expensive. >

Re: [RFC] Sharing PMU counters across compatible events

2017-12-11 Thread Tejun Heo
Hello, Jiri. On Wed, Dec 06, 2017 at 12:42:04PM +0100, Jiri Olsa wrote: > I see this rather on the hw level, since it concerns HW counters > > I think we could detect same (alias) events at the time counters > are added/removed on/from the cpu and share their HW part like > counter idx, regs and

Re: [RFC] Sharing PMU counters across compatible events

2017-12-06 Thread Peter Zijlstra
On Fri, Dec 01, 2017 at 06:19:50AM -0800, Tejun Heo wrote: > What do you think? Would this be something worth pursuing? My worry with the whole thing is that it makes PMU scheduling _far_ more expensive. Currently HW PMU scheduling is 'bounded' by the fact that we have bounded hardware resource

Re: [RFC] Sharing PMU counters across compatible events

2017-12-06 Thread Jiri Olsa
On Fri, Dec 01, 2017 at 06:19:50AM -0800, Tejun Heo wrote: > Hello, > > There are cases where a single PMU event, let's say instructions, is > interesting for different subsets of the system. For example, it > could be interesting to monitor instructions system-wide, at cgroup > level and per eac

[RFC] Sharing PMU counters across compatible events

2017-12-01 Thread Tejun Heo
Hello, There are cases where a single PMU event, let's say instructions, is interesting for different subsets of the system. For example, it could be interesting to monitor instructions system-wide, at cgroup level and per each thread. This could easily be me not knowing better but I can't think