Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752178AbbGHX2v (ORCPT ); Wed, 8 Jul 2015 19:28:51 -0400 Received: from mail-ie0-f171.google.com ([209.85.223.171]:33263 "EHLO mail-ie0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751265AbbGHX2d (ORCPT ); Wed, 8 Jul 2015 19:28:33 -0400 Date: Wed, 8 Jul 2015 16:28:30 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Michal Hocko cc: Andrew Morton , Sergey Senozhatsky , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [patch v2 2/3] mm, oom: organize oom context into struct In-Reply-To: <20150702060111.GB3989@dhcp22.suse.cz> Message-ID: References: <20150702060111.GB3989@dhcp22.suse.cz> User-Agent: Alpine 2.10 (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 Content-Length: 1283 Lines: 28 On Thu, 2 Jul 2015, Michal Hocko wrote: > On Wed 01-07-15 14:37:14, David Rientjes wrote: > > The force_kill member of struct oom_control isn't needed if an order of > > -1 is used instead. This is the same as order == -1 in > > struct compact_control which requires full memory compaction. > > > > This patch introduces no functional change. > > But it obscures the code and I really dislike this change as pointed out > previously. > The oom killer is often called at the end of a very lengthy stack since memory allocation itself can be called deep in the stack. Thus, reducing the amount of memory, even for a small lil bool, is helpful. This is especially true when other such structs, struct compact_control, does the exact same thing by using order == -1 to mean explicit compaction. I'm personally tired of fixing stack overflows and you're arguing against "obscurity" that even occurs in other parts of the mm code. oc->force_kill has no reason to exist, and thus it's removed in this patch and for good reason. -- 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/