From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH] cgroup: add tracepoints to track cgroup events Date: Thu, 21 Aug 2014 12:07:01 -0500 Message-ID: <20140821170701.GA3940@mtj.dyndns.org> References: <1408592785-6700-1-git-send-email-andrea@betterlinux.com> <20140821141330.GA1766@mtj.dyndns.org> <20140821153541.GA7625@Dell> <20140821170002.GB7625@Dell> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=bUhiSm/0mhijmenzFtixOBEF5qe5l693P7sWWRRkKq0=; b=u6znPOR3XMc9+Rw963AWviJjHPNvA1GA8OkATpQJfBkw47OGgkK1tkx9+sFwlpAOtP J0b/Vc4vcrELHXljcOSImm1j+mAaqGh1rPn/Ce/XQyl2ADLD4UShRLhFscEfahYOUt6Y KJPugsrtW3hqO6uusnmaF/LVPGv/34u5EN9dpdwBlOEuagqV2ExBqeBDvpsIFKmjdL2B IEvcgH0XWsGmvVAp6cq3AM5u7ERNibqMHlsmA1AbcibjoDaviSCuq1Gp7ZUjZ7kcVBv6 AhYqZJ/0hxpOlaWv/IOwRHu60W6qlRLqKHAGLKdSNhbP0VepQ80iENhNNK6OYTY8/3NP VvtA== Content-Disposition: inline In-Reply-To: <20140821170002.GB7625@Dell> Sender: linux-kernel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Andrea Righi Cc: Li Zefan , Steven Rostedt , Ingo Molnar , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Matt Heaton Hello, Anrea. On Thu, Aug 21, 2014 at 11:00:02AM -0600, Andrea Righi wrote: > hmm... am I missing something or we already support directory events? Ah, right, those mkdir/rmdir and writes automatically generate those events. > root@Dell:~# grep cgroups /proc/mounts > none /cgroups cgroup rw,relatime,cpuset,cpu,cpuacct,memory,devices,freezer,perf_event,hugetlb 0 0 > root@Dell:~# inotifywait -m -r -e modify -e move -e create -e delete /cgroups > Setting up watches. Beware: since -r was given, this may take a while! > Watches established. > /cgroups/ CREATE,ISDIR test > /cgroups/test/ MODIFY cgroup.procs > /cgroups/test/ MODIFY cgroup.procs > /cgroups/test/ MODIFY cgroup.populated > /cgroups/ MODIFY cgroup.procs > /cgroups/ MODIFY cgroup.procs > /cgroups/test/ MODIFY cgroup.populated > /cgroups/ DELETE,ISDIR test > > I still need to figure out a smart way to track which PIDs are > added/removed to/from cgroup.procs from userland (inotifywait + git? :)), > but all the other informations provided by my tracepoint patch seem to > be already available via [di]notify. Hmmm... yeah, determining exactly which pids got added / removed can be cumbersome from just MODIFY events. That said, what are you trying to do with such information? Thanks. -- tejun