From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [RFD] Merge task counter into memcg Date: Tue, 17 Apr 2012 08:23:50 -0700 Message-ID: <20120417152350.GC32402__20996.7164243155$1334676248$gmane$org@google.com> References: <20120411185715.GA4317@somewhere.redhat.com> <4F86527C.2080507@samsung.com> <20120417010902.GA14646@somewhere.redhat.com> <4F8D1171.1090504@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <4F8D1171.1090504-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Alexander Nikiforov Cc: "Daniel P. Berrange" , Frederic Weisbecker , Containers , Daniel Walsh , Hugh Dickins , LKML , Johannes Weiner , Cgroups , Andrew Morton List-Id: containers.vger.kernel.org Hello, On Tue, Apr 17, 2012 at 10:45:05AM +0400, Alexander Nikiforov wrote: > between them. Now we have only 1 way to get notification about tasks > file - inotify(), but this approach works only if you work from > userspace with file (e.g. create struct file, for example with echo > $$ /sys/abc/tasks), but when something happens from kernel side > (do_fork()/do_exit) we cannot get any event about group of the > process (we can scan tasks file and count number of PID, or work > with > waitpid(), but IMHO this is ugly solutions) Wouldn't simply generating FS_MODIFY event on the tasks file do the trick? Thanks. -- tejun