Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1441536
| From | Aravinda Prasad <aravinda@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace |
| Date | 2016-07-12 18:30 +0200 |
| Message-ID | <rU8Jk-7nR-5@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <rOH73-2eF-9@gated-at.bofh.it> <rU2aS-2Zl-31@gated-at.bofh.it> <rU4mm-4l8-21@gated-at.bofh.it> <rU5iq-4W1-21@gated-at.bofh.it> <rU5BM-5k0-43@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 then confine yourself to that?
No need to create cgroup and confine processes to that cgroup. The below
check during event filtering will take care:
+ if (cpuctx->perf_ns != event->perf_ns)
+ return false;
event->perf_ns is set during perf_event_alloc():
+ if (current->nsproxy->perf_ns != &init_perf_ns) {
+ /*
+ * If we are called from our own perf namespace, set
+ * event->perf_ns
+ */
+ event->perf_ns = current->nsproxy->perf_ns;
+ [...]
+ }
>
>> Also in the v1 of cgroups it's possible to have a process member of
>> more than 1 cgroup.
>
> Yeah, so? We only care about the perf controller obviously.
>
--
Regards,
Aravinda
Back to linux.kernel | Previous | Next — Previous 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