Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751979AbaLRDkg (ORCPT ); Wed, 17 Dec 2014 22:40:36 -0500 Received: from szxga01-in.huawei.com ([119.145.14.64]:36330 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751615AbaLRDke (ORCPT ); Wed, 17 Dec 2014 22:40:34 -0500 Message-ID: <54924CA4.7080403@huawei.com> Date: Thu, 18 Dec 2014 11:40:20 +0800 From: Zefan Li User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Stephane Eranian CC: Stephane Eranian , Stephane Eranian , Vince Weaver , "Arnaldo Carvalho de Melo" , LKML , Ingo Molnar , Peter Zijlstra , Tejun Heo Subject: Re: [perf tool] cgroup support broken on Debian? References: <20141215220150.GP9845@kernel.org> <5490E856.6050904@huawei.com> <5490F24C.7090202@huawei.com> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.18.230] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>> 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. >> > You can mount the cgroup fs for perf_event multiple times. I > tried and it works, though it is useless. > Yes, but they are the same. > Vince, I think the correct way to detect which entry is for perf_event > is to look for filesystem type cgroup and option perf_event. It cannot > be anything else. First match is good enough. > . +1 -- 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/