Re: [RFC 0/5] CR4 handling improvements

2014-10-24 Thread Andy Lutomirski
On Fri, Oct 24, 2014 at 5:41 AM, Vince Weaver wrote: > On Thu, 23 Oct 2014, Peter Zijlstra wrote: > >> On Tue, Oct 21, 2014 at 01:05:49PM -0400, Vince Weaver wrote: > >> > There are various reasons why you might want to start events at times >> > other than the beginning of the program. Some peop

Re: [RFC 0/5] CR4 handling improvements

2014-10-24 Thread Vince Weaver
On Thu, 23 Oct 2014, Peter Zijlstra wrote: > On Tue, Oct 21, 2014 at 01:05:49PM -0400, Vince Weaver wrote: > > There are various reasons why you might want to start events at times > > other than the beginning of the program. Some people don't like kernel > > multiplexing so they start/stop man

Re: [RFC 0/5] CR4 handling improvements

2014-10-23 Thread Peter Zijlstra
On Tue, Oct 21, 2014 at 01:05:49PM -0400, Vince Weaver wrote: > On Tue, 21 Oct 2014, Peter Zijlstra wrote: > > > > perf_event is also fairly high overhead for setting up and starting > > > events, > > > > Which you only do once at the start, so is that really a problem? > > There are various re

Re: [RFC 0/5] CR4 handling improvements

2014-10-21 Thread Vince Weaver
On Tue, 21 Oct 2014, Peter Zijlstra wrote: > > perf_event is also fairly high overhead for setting up and starting > > events, > > Which you only do once at the start, so is that really a problem? There are various reasons why you might want to start events at times other than the beginning of

Re: [RFC 0/5] CR4 handling improvements

2014-10-21 Thread Peter Zijlstra
On Tue, Oct 21, 2014 at 11:00:26AM -0400, Vince Weaver wrote: > On Mon, 20 Oct 2014, Andy Lutomirski wrote: > > > ISTM it would be a lot better to use the perf subsystem for this. You > > can probably pin an event to a pmu. > > No, you cannot pin an event to a counter with perf_event. > That's

Re: [RFC 0/5] CR4 handling improvements

2014-10-21 Thread Vince Weaver
On Mon, 20 Oct 2014, Andy Lutomirski wrote: > ISTM it would be a lot better to use the perf subsystem for this. You > can probably pin an event to a pmu. No, you cannot pin an event to a counter with perf_event. That's one of the big differences between perf_event and, say, perfmon2. With per

Re: [RFC 0/5] CR4 handling improvements

2014-10-20 Thread Andy Lutomirski
On Mon, Oct 20, 2014 at 9:06 PM, Vince Weaver wrote: > On Tue, 14 Oct 2014, Andy Lutomirski wrote: > >> This little series tightens up rdpmc permissions. With it applied, >> rdpmc can only be used if a perf_event is actually mmapped. For now, >> this is only really useful for seccomp. > > So jus

Re: [RFC 0/5] CR4 handling improvements

2014-10-20 Thread Vince Weaver
On Tue, 14 Oct 2014, Andy Lutomirski wrote: > This little series tightens up rdpmc permissions. With it applied, > rdpmc can only be used if a perf_event is actually mmapped. For now, > this is only really useful for seccomp. So just to be difficult... I am aware of at least one group who is d

[RFC 0/5] CR4 handling improvements

2014-10-14 Thread Andy Lutomirski
Hi Peter, etc, This little series tightens up rdpmc permissions. With it applied, rdpmc can only be used if a perf_event is actually mmapped. For now, this is only really useful for seccomp. At some point this could be further tightened up to only allow rdpmc if an actual self-monitoring perf e