From: Zefan Li <lizefan@huawei.com>
To: <eranian@gmail.com>
Cc: Stephane Eranian <eranian@googlemail.com>,
Vince Weaver <vincent.weaver@maine.edu>,
Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>,
LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Stephane Eranian <eranian@google.com>, Tejun Heo <tj@kernel.org>
Subject: Re: [perf tool] cgroup support broken on Debian?
Date: Wed, 17 Dec 2014 11:02:36 +0800 [thread overview]
Message-ID: <5490F24C.7090202@huawei.com> (raw)
In-Reply-To: <CAMsRxfL2GrA-1N7AZM42LC+aLBRB-pvtTXs1ovLine=Hv3PFag@mail.gmail.com>
On 2014/12/17 10:29, Stephane Eranian wrote:
> On Wed, Dec 17, 2014 at 3:20 AM, Zefan Li <lizefan@huawei.com> wrote:
>> On 2014/12/17 1:17, Vince Weaver wrote:
>>> On Mon, 15 Dec 2014, Stephane Eranian wrote:
>>>> On Mon, Dec 15, 2014 at 11:01 PM, Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com> wrote:
>>>
>>>> fs is visible. The cgroup file system type is not there anymore. They are using
>>>> tmpfs which is not ideal to detect just cgroup. Looks like now, we have to look
>>>> at the mount point which is flaky.
>>>
>>> The trivial fix is to just always assume things will be under
>>> /sys/fs/cgroup
>>> which looks like to be the new official mount point.
>>>
>>> This will break on older systems though, or systems that mount cgroupfs in
>>> multiple locations.
>>>
>>> Another alternative is to change the interface to require the full
>>> cgroupfs pathname as an argument to -G
>>>
>>
>> What's the problem here?
>>
>> none /sys/fs/cgroup tmpfs rw,relatime,size=4k,mode=755 0 0
>> systemd /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,perf_event,name=systemd 0 0
>>
>> cgroup is mounted in /sys/fs/cgroup/systemd, so you should pass '/' to the -G argument:
>>
> Is that the only mountpoint possible?
> The tool needs to detect a valid mount point to locate the named cgroup.
> That's assuming that if I create cgroup foo, then it appears under
> //sys/fs/cgroup/systemd/foo
>
There can be only one cgroupfs mountpoint which has perf_event subsystem
attached to it.
So for this setup:
mount -t tmpfs /sys/fs/cgroup
mkdir /sys/fs/cgroup/memory
mkdir /sys/fs/cgroup/perf
mount -t cgroup -o memory memcg /sys/fs/cgroup/memory
mount -t cgroup -o perf_event perf /sys/fs/cgroup/perf
The perf tool will locate the mountpoint as /sys/fs/cgroup/perf.
next prev parent reply other threads:[~2014-12-17 3:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-15 21:07 [perf tool] cgroup support broken on Debian? Vince Weaver
2014-12-15 22:01 ` Arnaldo Carvalho de Melo
2014-12-15 22:45 ` Stephane Eranian
2014-12-16 17:17 ` Vince Weaver
2014-12-16 17:29 ` Stephane Eranian
2014-12-17 2:20 ` Zefan Li
2014-12-17 2:29 ` Stephane Eranian
2014-12-17 3:02 ` Zefan Li [this message]
2014-12-17 16:36 ` Stephane Eranian
2014-12-18 3:40 ` Zefan Li
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=5490F24C.7090202@huawei.com \
--to=lizefan@huawei.com \
--cc=a.p.zijlstra@chello.nl \
--cc=arnaldo.melo@gmail.com \
--cc=eranian@gmail.com \
--cc=eranian@google.com \
--cc=eranian@googlemail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tj@kernel.org \
--cc=vincent.weaver@maine.edu \
/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