lkml.org 
[lkml]   [2014]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [perf tool] cgroup support broken on Debian?
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.



\
 
 \ /
  Last update: 2014-12-17 04:41    [W:0.396 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site