From: Peter Zijlstra <peterz@infradead.org>
To: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, rostedt@goodmis.org,
mingo@redhat.com, paulus@samba.org, acme@kernel.org,
hbathini@linux.vnet.ibm.com, ananth@in.ibm.com
Subject: Re: [RFC PATCH] perf: Container-aware tracing support
Date: Fri, 17 Jul 2015 12:19:50 +0200 [thread overview]
Message-ID: <20150717101950.GS3644@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <55A688A0.7070507@linux.vnet.ibm.com>
On Wed, Jul 15, 2015 at 09:51:52PM +0530, Aravinda Prasad wrote:
> >> + } else if (task_active_pid_ns(current) != &init_pid_ns) {
> >
> > Why the pid namespace?
>
> This comes from my understanding of container -- having at least a
> separate PID namespace with processes inside a container grouped into a
> single perf_event cgroups subsystem.
>
> I know there are other ways to define a container, however, I thought I
> start with the above one.
Right, but you should at least mention this, preferably in a comment.
> >
> >> + /* Don't set event->cgrp if task belongs to root cgroup */
> >> + if (task_css_is_root(current, perf_event_cgrp_id))
> >> + return ret;
> >
> > So if you have the root perf_cgroup inside your container you can
> > escape?
>
> If we have root perf_cgroup inside the container then even if we set
> event->cgrp we will be including all processes in the system.
Yes, that's what I said. Why does that make sense?
next prev parent reply other threads:[~2015-07-17 10:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-15 9:08 [RFC PATCH] perf: Container-aware tracing support Aravinda Prasad
2015-07-15 12:47 ` Peter Zijlstra
2015-07-15 16:21 ` Aravinda Prasad
2015-07-17 10:19 ` Peter Zijlstra [this message]
2015-07-17 12:20 ` Aravinda Prasad
2015-07-17 12:26 ` Ingo Molnar
-- strict thread matches above, loose matches on Subject: below --
2017-01-12 12:11 Aravinda Prasad
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150717101950.GS3644@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@kernel.org \
--cc=ananth@in.ibm.com \
--cc=aravinda@linux.vnet.ibm.com \
--cc=hbathini@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox