Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace

2016-07-12 Thread Aravinda Prasad
On Tuesday 12 July 2016 06:34 PM, Peter Zijlstra wrote: > On Tue, Jul 12, 2016 at 03:41:42PM +0300, Nikolay Borisov wrote: > >> Namespaces and cgroups are completely orthogonal to one another. > > Then how do you specify what your new 'root' is? Surely you must first > create a cgroup and

Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace

2016-07-12 Thread Aravinda Prasad
On Tuesday 12 July 2016 06:34 PM, Peter Zijlstra wrote: > On Tue, Jul 12, 2016 at 03:41:42PM +0300, Nikolay Borisov wrote: > >> Namespaces and cgroups are completely orthogonal to one another. > > Then how do you specify what your new 'root' is? Surely you must first > create a cgroup and

Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace

2016-07-12 Thread Aravinda Prasad
On Tuesday 12 July 2016 07:57 PM, Peter Zijlstra wrote: > On Tue, Jul 12, 2016 at 08:55:17AM -0500, Eric W. Biederman wrote: > >> I completely misread the description of this, or I would have something >> earlier. For some reason I thought he was talking about the perf >> controller. >> >> As

Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace

2016-07-12 Thread Aravinda Prasad
On Tuesday 12 July 2016 07:57 PM, Peter Zijlstra wrote: > On Tue, Jul 12, 2016 at 08:55:17AM -0500, Eric W. Biederman wrote: > >> I completely misread the description of this, or I would have something >> earlier. For some reason I thought he was talking about the perf >> controller. >> >> As

Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace

2016-07-12 Thread Peter Zijlstra
On Tue, Jul 12, 2016 at 08:55:17AM -0500, Eric W. Biederman wrote: > I completely misread the description of this, or I would have something > earlier. For some reason I thought he was talking about the perf > controller. > > As I recall the tricky part of this was to have tracing that was safe

Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace

2016-07-12 Thread Peter Zijlstra
On Tue, Jul 12, 2016 at 08:55:17AM -0500, Eric W. Biederman wrote: > I completely misread the description of this, or I would have something > earlier. For some reason I thought he was talking about the perf > controller. > > As I recall the tricky part of this was to have tracing that was safe

Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace

2016-07-12 Thread Eric W. Biederman
Peter Zijlstra writes: > On Tue, Jul 12, 2016 at 03:41:42PM +0300, Nikolay Borisov wrote: > >> Namespaces and cgroups are completely orthogonal to one another. > > Then how do you specify what your new 'root' is? Surely you must first > create a cgroup and then confine

Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace

2016-07-12 Thread Eric W. Biederman
Peter Zijlstra writes: > On Tue, Jul 12, 2016 at 03:41:42PM +0300, Nikolay Borisov wrote: > >> Namespaces and cgroups are completely orthogonal to one another. > > Then how do you specify what your new 'root' is? Surely you must first > create a cgroup and then confine yourself to that? > >>

Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace

2016-07-12 Thread Peter Zijlstra
On Tue, Jul 12, 2016 at 03:41:42PM +0300, Nikolay Borisov wrote: > Namespaces and cgroups are completely orthogonal to one another. Then how do you specify what your new 'root' is? Surely you must first create a cgroup and then confine yourself to that? > Also in the v1 of cgroups it's

Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace

2016-07-12 Thread Peter Zijlstra
On Tue, Jul 12, 2016 at 03:41:42PM +0300, Nikolay Borisov wrote: > Namespaces and cgroups are completely orthogonal to one another. Then how do you specify what your new 'root' is? Surely you must first create a cgroup and then confine yourself to that? > Also in the v1 of cgroups it's

Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace

2016-07-12 Thread Nikolay Borisov
On 07/12/2016 02:47 PM, Peter Zijlstra wrote: > On Tue, Jul 12, 2016 at 02:56:17PM +0530, Aravinda Prasad wrote: >> >> >> On Monday 27 June 2016 09:20 PM, Peter Zijlstra wrote: >>> On Tue, Jun 14, 2016 at 10:19:51PM +0530, Aravinda Prasad wrote: Whenever perf tool is executed inside a

Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace

2016-07-12 Thread Nikolay Borisov
On 07/12/2016 02:47 PM, Peter Zijlstra wrote: > On Tue, Jul 12, 2016 at 02:56:17PM +0530, Aravinda Prasad wrote: >> >> >> On Monday 27 June 2016 09:20 PM, Peter Zijlstra wrote: >>> On Tue, Jun 14, 2016 at 10:19:51PM +0530, Aravinda Prasad wrote: Whenever perf tool is executed inside a

Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace

2016-07-12 Thread Peter Zijlstra
On Tue, Jul 12, 2016 at 02:56:17PM +0530, Aravinda Prasad wrote: > > > On Monday 27 June 2016 09:20 PM, Peter Zijlstra wrote: > > On Tue, Jun 14, 2016 at 10:19:51PM +0530, Aravinda Prasad wrote: > >> Whenever perf tool is executed inside a container, this > >> patch restricts the events to the

Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace

2016-07-12 Thread Peter Zijlstra
On Tue, Jul 12, 2016 at 02:56:17PM +0530, Aravinda Prasad wrote: > > > On Monday 27 June 2016 09:20 PM, Peter Zijlstra wrote: > > On Tue, Jun 14, 2016 at 10:19:51PM +0530, Aravinda Prasad wrote: > >> Whenever perf tool is executed inside a container, this > >> patch restricts the events to the

Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace

2016-07-12 Thread Aravinda Prasad
On Monday 27 June 2016 09:20 PM, Peter Zijlstra wrote: > On Tue, Jun 14, 2016 at 10:19:51PM +0530, Aravinda Prasad wrote: >> Whenever perf tool is executed inside a container, this >> patch restricts the events to the perf-namespace in which >> the perf tool is executing. >> >> This patch is

Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace

2016-07-12 Thread Aravinda Prasad
On Monday 27 June 2016 09:20 PM, Peter Zijlstra wrote: > On Tue, Jun 14, 2016 at 10:19:51PM +0530, Aravinda Prasad wrote: >> Whenever perf tool is executed inside a container, this >> patch restricts the events to the perf-namespace in which >> the perf tool is executing. >> >> This patch is

Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace

2016-06-28 Thread Aravinda Prasad
On Monday 27 June 2016 09:20 PM, Peter Zijlstra wrote: > On Tue, Jun 14, 2016 at 10:19:51PM +0530, Aravinda Prasad wrote: >> Whenever perf tool is executed inside a container, this >> patch restricts the events to the perf-namespace in which >> the perf tool is executing. >> >> This patch is

Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace

2016-06-28 Thread Aravinda Prasad
On Monday 27 June 2016 09:20 PM, Peter Zijlstra wrote: > On Tue, Jun 14, 2016 at 10:19:51PM +0530, Aravinda Prasad wrote: >> Whenever perf tool is executed inside a container, this >> patch restricts the events to the perf-namespace in which >> the perf tool is executing. >> >> This patch is

Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace

2016-06-27 Thread Peter Zijlstra
On Tue, Jun 14, 2016 at 10:19:51PM +0530, Aravinda Prasad wrote: > Whenever perf tool is executed inside a container, this > patch restricts the events to the perf-namespace in which > the perf tool is executing. > > This patch is based on the existing support available > for tracing with

Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace

2016-06-27 Thread Peter Zijlstra
On Tue, Jun 14, 2016 at 10:19:51PM +0530, Aravinda Prasad wrote: > Whenever perf tool is executed inside a container, this > patch restricts the events to the perf-namespace in which > the perf tool is executing. > > This patch is based on the existing support available > for tracing with

[RFC PATCH 2/2] perf: Filter events based on perf-namespace

2016-06-14 Thread Aravinda Prasad
Whenever perf tool is executed inside a container, this patch restricts the events to the perf-namespace in which the perf tool is executing. This patch is based on the existing support available for tracing with cgroups. TODO: - Avoid code duplication. Signed-off-by: Aravinda Prasad

[RFC PATCH 2/2] perf: Filter events based on perf-namespace

2016-06-14 Thread Aravinda Prasad
Whenever perf tool is executed inside a container, this patch restricts the events to the perf-namespace in which the perf tool is executing. This patch is based on the existing support available for tracing with cgroups. TODO: - Avoid code duplication. Signed-off-by: Aravinda Prasad ---