Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1441321
| From | Nikolay Borisov <kernel@kyup.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace |
| Date | 2016-07-12 14:50 +0200 |
| Message-ID | <rU5iq-4W1-21@gated-at.bofh.it> (permalink) |
| References | <rJZHk-7nr-19@gated-at.bofh.it> <rJZQZ-7rp-1@gated-at.bofh.it> <rOH73-2eF-9@gated-at.bofh.it> <rU2aS-2Zl-31@gated-at.bofh.it> <rU4mm-4l8-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 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. >>> >>> Can't you, at perf_event_open() time, convert a per-cpu event into a >>> per-cpu-per-cgroup event for these namespace thingies? >>> >>> That seems to immediately and completely remove all that duplication. >> >> Sorry for the delay in the response. >> >> I was looking into a way how a per-cpu event can be converted to >> per-cpu-per-cgroup event at perf_event_open() but could not figure out >> how to do this conversion. The cgroup event expects the fd of the cgroup >> directory in cgroupfs and in this case we don't have any fd passed in. >> Not sure if I am missing anything. > > Would not the current namespace have a link to the correct cgroup? > Wasn't that the entire point of the namespace thing? Namespaces and cgroups are completely orthogonal to one another. Also in the v1 of cgroups it's possible to have a process member of more than 1 cgroup. >
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace Aravinda Prasad <aravinda@linux.vnet.ibm.com> - 2016-07-12 11:30 +0200
Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace Peter Zijlstra <peterz@infradead.org> - 2016-07-12 13:50 +0200
Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace Nikolay Borisov <kernel@kyup.com> - 2016-07-12 14:50 +0200
Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace Peter Zijlstra <peterz@infradead.org> - 2016-07-12 15:10 +0200
Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace ebiederm@xmission.com (Eric W. Biederman) - 2016-07-12 16:10 +0200
Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace Peter Zijlstra <peterz@infradead.org> - 2016-07-12 16:30 +0200
Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace Aravinda Prasad <aravinda@linux.vnet.ibm.com> - 2016-07-12 18:10 +0200
Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace Aravinda Prasad <aravinda@linux.vnet.ibm.com> - 2016-07-12 18:30 +0200
csiph-web