From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yh0-f54.google.com (mail-yh0-f54.google.com [209.85.213.54]) by kanga.kvack.org (Postfix) with ESMTP id 7DEAF6B0035 for ; Sat, 30 Nov 2013 17:12:56 -0500 (EST) Received: by mail-yh0-f54.google.com with SMTP id z12so7636631yhz.41 for ; Sat, 30 Nov 2013 14:12:56 -0800 (PST) Received: from mail-yh0-x22b.google.com (mail-yh0-x22b.google.com [2607:f8b0:4002:c01::22b]) by mx.google.com with ESMTPS id y62si40989862yhc.219.2013.11.30.14.12.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 30 Nov 2013 14:12:54 -0800 (PST) Received: by mail-yh0-f43.google.com with SMTP id a41so7190548yho.30 for ; Sat, 30 Nov 2013 14:12:54 -0800 (PST) Date: Sat, 30 Nov 2013 14:12:51 -0800 (PST) From: David Rientjes Subject: Re: [merged] mm-memcg-handle-non-error-oom-situations-more-gracefully.patch removed from -mm tree In-Reply-To: <20131130155542.GO3556@cmpxchg.org> Message-ID: References: <20131127233353.GH3556@cmpxchg.org> <20131128021809.GI3556@cmpxchg.org> <20131128031313.GK3556@cmpxchg.org> <20131128035218.GM3556@cmpxchg.org> <20131130033536.GL22729@cmpxchg.org> <20131130155542.GO3556@cmpxchg.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Johannes Weiner Cc: Andrew Morton , Michal Hocko , azurit@pobox.sk, mm-commits@vger.kernel.org, stable@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org On Sat, 30 Nov 2013, Johannes Weiner wrote: > > The oom killer requires a tasklist scan, or an iteration over the set of > > processes attached to the memcg for the memcg case, to find a victim. It > > already defers if it finds eligible threads with TIF_MEMDIE set. > > And now you say that this race does not really exist and repeat the > same ramblings about last-minute checks to avoid unnecessary kills > again. And again without any supporting data that I already asked > for. > The race does exist, perhaps you don't understand what the race is? This race occurs when process (A) declares oom and enters the oom killer, meanwhile an already oom killed victim (B) frees its memory and exits, and the process (A) oom kills another process even though the memcg is below its limit because of process (B). When doing something expensive in the kernel like oom killing, it usually doesn't cause so much hassle when the suggestion is: