From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932358Ab3LENOr (ORCPT ); Thu, 5 Dec 2013 08:14:47 -0500 Received: from cantor2.suse.de ([195.135.220.15]:34764 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932327Ab3LENOp (ORCPT ); Thu, 5 Dec 2013 08:14:45 -0500 Date: Thu, 5 Dec 2013 14:14:44 +0100 From: Michal Hocko To: Johannes Weiner Cc: Andrew Morton , David Rientjes , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [patch 2/2] mm: memcg: do not allow task about to OOM kill to bypass the limit Message-ID: <20131205131444.GC16711@dhcp22.suse.cz> References: <1386197114-5317-1-git-send-email-hannes@cmpxchg.org> <1386197114-5317-3-git-send-email-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1386197114-5317-3-git-send-email-hannes@cmpxchg.org> 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 Wed 04-12-13 17:45:14, Johannes Weiner wrote: > 4942642080ea ("mm: memcg: handle non-error OOM situations more > gracefully") allowed tasks that already entered a memcg OOM condition > to bypass the memcg limit on subsequent allocation attempts hoping > this would expedite finishing the page fault and executing the kill. > > David Rientjes is worried that this breaks memcg isolation guarantees > and since there is no evidence that the bypass actually speeds up > fault processing just change it so that these subsequent charge > attempts fail outright. The notable exception being __GFP_NOFAIL > charges which are required to bypass the limit regardless. > > Reported-by: David Rientjes > Signed-off-by: Johannes Weiner We want this in stable as well IMHO. Acked-by: Michal Hocko > --- > mm/memcontrol.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c > index f6a63f5b3827..bf5e89457149 100644 > --- a/mm/memcontrol.c > +++ b/mm/memcontrol.c > @@ -2694,7 +2694,7 @@ static int __mem_cgroup_try_charge(struct mm_struct *mm, > goto bypass; > > if (unlikely(task_in_memcg_oom(current))) > - goto bypass; > + goto nomem; > > if (gfp_mask & __GFP_NOFAIL) > oom = false; > -- > 1.8.4.2 > -- Michal Hocko SUSE Labs