From: Michal Hocko Subject: Re: [PATCH v2] vmpressure: make sure memcg stays alive until all users are signaled Date: Fri, 12 Jul 2013 11:29:27 +0200 Message-ID: <20130712092927.GA15307@dhcp22.suse.cz> References: <20130711083110.GC21667@dhcp22.suse.cz> <51DE701C.6010800@huawei.com> <20130711092542.GD21667@dhcp22.suse.cz> <51DE7AAF.6070004@huawei.com> <20130711093300.GE21667@dhcp22.suse.cz> <20130711154408.GA9229@mtj.dyndns.org> <20130711162215.GM21667@dhcp22.suse.cz> <20130711163238.GC9229@mtj.dyndns.org> <20130712084039.GA13224@dhcp22.suse.cz> <51DFCA49.4080407@huawei.com> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: <51DFCA49.4080407-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Li Zefan Cc: Tejun Heo , Anton Vorontsov , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, Johannes Weiner , KAMEZAWA Hiroyuki , KOSAKI Motohiro On Fri 12-07-13 17:20:09, Li Zefan wrote: [...] > But if I read the code correctly, even no one registers a vmpressure event, > vmpressure() is always running and queue the work item. True but checking there is somebody is rather impractical. First we would have to take a events_lock to check this and then drop it after scheduling the work. Which doesn't guarantee that the registered event wouldn't go away. And even trickier, we would have to do the same for all parents up the hierarchy. -- Michal Hocko SUSE Labs