From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751361Ab3K3WM7 (ORCPT ); Sat, 30 Nov 2013 17:12:59 -0500 Received: from mail-yh0-f52.google.com ([209.85.213.52]:48664 "EHLO mail-yh0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750975Ab3K3WMz (ORCPT ); Sat, 30 Nov 2013 17:12:55 -0500 Date: Sat, 30 Nov 2013 14:12:51 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com 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 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> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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: