Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1186783

Re: [RFC PATCH] perf: Container-aware tracing support

From Aravinda Prasad <aravinda@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH] perf: Container-aware tracing support
Date 2015-07-17 14:30 +0200
Message-ID <pNcW7-5lc-37@gated-at.bofh.it> (permalink)
References <pMqRs-2UU-15@gated-at.bofh.it> <pMuim-7LZ-19@gated-at.bofh.it> <pMxJf-4JN-7@gated-at.bofh.it> <pNb3Y-2EK-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH] perf: Container-aware tracing support Aravinda Prasad <aravinda@linux.vnet.ibm.com> - 2015-07-15 11:10 +0200
  Re: [RFC PATCH] perf: Container-aware tracing support Peter Zijlstra <peterz@infradead.org> - 2015-07-15 14:50 +0200
    Re: [RFC PATCH] perf: Container-aware tracing support Peter Zijlstra <peterz@infradead.org> - 2015-07-17 12:30 +0200
      Re: [RFC PATCH] perf: Container-aware tracing support Aravinda Prasad <aravinda@linux.vnet.ibm.com> - 2015-07-17 14:30 +0200
    Re: [RFC PATCH] perf: Container-aware tracing support Ingo Molnar <mingo@kernel.org> - 2015-07-17 14:30 +0200

csiph-web