Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756780Ab2KOIzi (ORCPT ); Thu, 15 Nov 2012 03:55:38 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:47432 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756544Ab2KOIzd (ORCPT ); Thu, 15 Nov 2012 03:55:33 -0500 Date: Thu, 15 Nov 2012 00:52:24 -0800 From: Anton Vorontsov To: David Rientjes Cc: "Kirill A. Shutemov" , Pekka Enberg , Mel Gorman , Leonid Moiseichuk , KOSAKI Motohiro , Minchan Kim , Bartlomiej Zolnierkiewicz , John Stultz , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org, patches@linaro.org, kernel-team@android.com, linux-man@vger.kernel.org Subject: Re: [RFC v3 0/3] vmpressure_fd: Linux VM pressure notifications Message-ID: <20121115085224.GA4635@lizard> References: <20121107105348.GA25549@lizard> <20121107112136.GA31715@shutemov.name> <20121107114321.GA32265@shutemov.name> <20121115033932.GA15546@lizard.sbx05977.paloaca.wayport.net> <20121115073420.GA19036@lizard.sbx05977.paloaca.wayport.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1744 Lines: 40 On Thu, Nov 15, 2012 at 12:11:47AM -0800, David Rientjes wrote: [...] > Might not be too difficult if you implement your own cgroup to aggregate > these tasks for which you want to know memory pressure events; it would > have to be triggered for the task trying to allocate memory at any given > time and how hard it was to allocate that memory in the slowpath, tie it > back to that tasks' memory pressure cgroup, and then report the trigger if > it's over a user-defined threshold normalized to the 0-100 scale. Then > you could co-mount this cgroup with memcg, cpusets, or just do it for the > root cgroup for users who want to monitor the entire system This seems doable. But > (CONFIG_CGROUPS is enabled by default). Hehe, you're saying that we have to have cgroups=y. :) But some folks were deliberately asking us to make the cgroups optional. OK, here is what I can try to do: - Implement memory pressure cgroup as you described, by doing so we'd make the thing play well with cpusets and memcg; - This will be eventfd()-based; - Once done, we will have a solution for pretty much every major use-case (i.e. servers, desktops and Android, they all have cgroups enabled); (- Optionally, if there will be a demand, for CGROUPS=n we can implement a separate sysfs file with the exactly same eventfd interface, it will only report global pressure. This will be for folks that don't want the cgroups for some reason. The interface can be discussed separately.) Thanks, Anton. -- 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/