From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753749Ab3KRSwW (ORCPT ); Mon, 18 Nov 2013 13:52:22 -0500 Received: from mail-ea0-f173.google.com ([209.85.215.173]:56702 "EHLO mail-ea0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753110Ab3KRSwR (ORCPT ); Mon, 18 Nov 2013 13:52:17 -0500 Date: Mon, 18 Nov 2013 19:52:13 +0100 From: Michal Hocko To: David Rientjes Cc: Andrew Morton , Johannes Weiner , KAMEZAWA Hiroyuki , linux-kernel@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org Subject: Re: [patch 2/2] mm, memcg: add memory.oom_control notification for system oom Message-ID: <20131118185213.GA12923@dhcp22.suse.cz> References: <20131031054942.GA26301@cmpxchg.org> <20131113233419.GJ707@cmpxchg.org> <20131114032508.GL707@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 On Thu 14-11-13 15:26:55, David Rientjes wrote: > A subset of applications that wait on memory.oom_control don't disable > the oom killer for that memcg and simply log or cleanup after the kernel > oom killer kills a process to free memory. > > We need the ability to do this for system oom conditions as well, i.e. > when the system is depleted of all memory and must kill a process. For > convenience, this can use memcg since oom notifiers are already present. Using the memcg interface for "read-only" interface without any plan for the "write" is only halfway solution. We want to handle global OOM in a more user defined ways but we have to agree on the proper interface first. I do not want to end up with something half baked with memcg and a different interface to do the real thing just because memcg turns out to be unsuitable. And to be honest, the more I am thinking about memcg based interface the stronger is my feeling that it is unsuitable for the user defined OOM policies. But that should be discussed properly (I will send a RFD in the follow up days). [...] -- Michal Hocko SUSE Labs