From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f70.google.com (mail-pl0-f70.google.com [209.85.160.70]) by kanga.kvack.org (Postfix) with ESMTP id E854F6B0025 for ; Fri, 23 Mar 2018 05:26:41 -0400 (EDT) Received: by mail-pl0-f70.google.com with SMTP id z11-v6so7299312plo.21 for ; Fri, 23 Mar 2018 02:26:41 -0700 (PDT) Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id w127sor2513630pfb.115.2018.03.23.02.26.40 for (Google Transport Security); Fri, 23 Mar 2018 02:26:40 -0700 (PDT) Date: Fri, 23 Mar 2018 02:26:39 -0700 (PDT) From: David Rientjes Subject: Re: [PATCH] memcg, thp: do not invoke oom killer on thp charges In-Reply-To: <20180323090704.GK23100@dhcp22.suse.cz> Message-ID: References: <20180321205928.22240-1-mhocko@kernel.org> <20180321214104.GT23100@dhcp22.suse.cz> <20180322085611.GY23100@dhcp22.suse.cz> <20180323090704.GK23100@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: Andrew Morton , Johannes Weiner , "Kirill A. Shutemov" , Vlastimil Babka , linux-mm@kvack.org, LKML On Fri, 23 Mar 2018, Michal Hocko wrote: > > Examples of where this isn't already done? It certainly wasn't a problem > > before __GFP_NORETRY was dropped in commit 2516035499b9 but you suspect > > it's a problem now. > > It is not a problem _right now_ as I've already pointed out few > times. We do not trigger the OOM killer for anything but #PF path. But > this is an implementation detail which can change in future and there is > actually some demand for the change. Once we start triggering the oom > killer for all charges then we do not really want to have the disparity. > Ok, my patch is only addressing the code as it sits today, not any theoretical code in the future. The fact remains that the PAGE_ALLOC_COSTLY_ORDER and high_zoneidx test for lowmem allocations in the allocation path are because oom killing is unlikely to free contiguous pages and lowmem, respectively. We wouldn't avoid oom kill in memcg just because a charge is __GFP_DMA. We shouldn't avoid oom kill in memcg just because the order is PAGE_ALLOC_COSTLY_ORDER: it's about contiguous memory, not about amount of memory. I believe you understand that and so I'm optimistic that we are good in closing this thread out. Thanks.