From: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>
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 17:50:52 +0530 [thread overview]
Message-ID: <55A8F324.9090206@linux.vnet.ibm.com> (raw)
In-Reply-To: <20150717101950.GS3644@twins.programming.kicks-ass.net>
On Friday 17 July 2015 03:49 PM, Peter Zijlstra wrote:
> 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.
Yes. I should have done that.
>
>>>
>>>> + /* 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?
We assume that processes are grouped into a single perf_event subsystem.
If we have root perf_cgroup, from our assumption, implies we are not
invoked from a container context. However, not sure if this assumption
is right.
>
--
Regards,
Aravinda
next prev parent reply other threads:[~2015-07-17 12:21 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
2015-07-17 12:20 ` Aravinda Prasad [this message]
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=55A8F324.9090206@linux.vnet.ibm.com \
--to=aravinda@linux.vnet.ibm.com \
--cc=acme@kernel.org \
--cc=ananth@in.ibm.com \
--cc=hbathini@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=peterz@infradead.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