Received: by 10.213.65.68 with SMTP id h4csp190810imn; Fri, 23 Mar 2018 02:27:58 -0700 (PDT) X-Google-Smtp-Source: AG47ELsYlfCkCsmsNFyg1M7vM98DS0Cp/gXUC+TwzfPM64s8ozrljUyqtEyvxq23E3szdfiRmmkT X-Received: by 2002:a17:902:760e:: with SMTP id k14-v6mr9586409pll.292.1521797278322; Fri, 23 Mar 2018 02:27:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521797278; cv=none; d=google.com; s=arc-20160816; b=Sd+tKkRkzirO8ZqxfmvKeS64n0nCMebCH/0VvvuVgo1KLa/7y6eZ5g7AOteDmTvfxF 4zg8j8oubM5DXROmI2u6fQpSSEwo+DhXeW44DpXvYLBMMh0GH062vxO0gSdvOrMAJgWZ rAlIgl2T8YFCSovt2ZWN04jFxT+JF8Bn4ZgBr3vWoHrY7kitnwHWqDM8PO7Xd1GVUm9W uDsIHb3k4dOFaHHELKOa2CSqj9JXF61hWC++Ayz0h42oVCstX4FzrnCqtBtYkl69T08z sENoN/52jkanRUU39OP9U56u8MaYe2tGekx7/xu8ucw3A6+S/RphbyE5OYoJHvdbSFlx PTAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=E4IKnvwgdJpIhzbCTlZ/7mmY8lLVrYx6WlkLp3302t0=; b=FvSzYvVfveAiJ0JGsJgri/A87OJ4fEiO9goUiheiajq7foM24wftDFs/sD2EfGWIZE icZJ+YVFfMXDYc1wWmEiG+ifSCTe+oi9Ke21Zc61WUOlpSYI6zPr9gOGYO7n/jns+vRF ojtlCKzLfdvJhYhVl/BwWA+PA9HVuaPXIEudqSXGjrM0wi/TPdptBB4qlnPvWgAWpyzz M+JJH6+NlijeicnSefU5/rYNQosZhRniSo36L7411lBrpJr7OQohI1HwwmOBWI7ScQFX SL9LMghDix0zC8rRoYG2wkJoQKwiZsc50FJ22C0Xx8yToaDhqTO0++HswJwqxvHMdIh/ Q/fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=A+tHCkNR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o3si5165592pgs.465.2018.03.23.02.27.43; Fri, 23 Mar 2018 02:27:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=A+tHCkNR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751921AbeCWJ0m (ORCPT + 99 others); Fri, 23 Mar 2018 05:26:42 -0400 Received: from mail-pf0-f172.google.com ([209.85.192.172]:47088 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751668AbeCWJ0l (ORCPT ); Fri, 23 Mar 2018 05:26:41 -0400 Received: by mail-pf0-f172.google.com with SMTP id z10so4487373pfh.13 for ; Fri, 23 Mar 2018 02:26:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=E4IKnvwgdJpIhzbCTlZ/7mmY8lLVrYx6WlkLp3302t0=; b=A+tHCkNRRT12l5XJBBVI0Ws6Pbmfb5N3WJiQ1ksNajvK1YQ2W44kuKWUt7BokDQTtC s+lRNpNWsemD/gl5YMoOa/j+v2zJqie2M34cK2n6TF4WVrrbqlKtIGLCl/42jcILAhul /34qOHZsHs1lPsMuOLFOeD/hfWbzi2xZ6XGWU9GmU5R0D6CBB3NZSeAvS+EPMAorX8l6 mTNHrBeXCWZt1ww5H7aNnuVVcBLroqFp29/+NAdHa1BzziP2TEAEsPZFjwPHFcTvMfig z5ztTHEMT+ew/HbbMZr0qDX4qWgvYDvnuxoau3U14Bk1HvNRWKTPFG8nsayk2C2rcQg3 eC0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=E4IKnvwgdJpIhzbCTlZ/7mmY8lLVrYx6WlkLp3302t0=; b=acCnFMRr2OM3SBlk8HSvg/m9HGTiFumN+i6kwIOyBFnsohEMDSLS9uQ9zeuOnTxYL/ zKpi2WHXwLDyNUzqXM6DWbfiJpbDftRogYMymmmXCHftonU+kKkZpV1EbLv5juObEi+i ipqaDC7GacNHVuM9k+Z3BAHfrnpnVaX2W1USzPF8z1qdgkM39EjOG8H0kQ+g7ajKeJrM PQvT9rTQ+nuJqMnoCHUmfWZ2B9KHiecuLKT/Gouz/re8c0oAgFcIPstOTkpWmXeNJvtb ZL/bSet0HNZnQF2O/WoQLLdCzMZOOjMtKgkHgA80zljkaaRL1SXFyPE7UT00MobD6SbQ J8Bw== X-Gm-Message-State: AElRT7GpaP033QImHUAC253dc/s6kxoacJ+LFpo/pnRUPPZ9D3kDexuq 05rvQeuWQjllLpp6D2LxmHR2ag== X-Received: by 10.98.200.9 with SMTP id z9mr17433585pff.128.1521797200413; Fri, 23 Mar 2018 02:26:40 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id a81sm2782499pfc.168.2018.03.23.02.26.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Mar 2018 02:26:39 -0700 (PDT) Date: Fri, 23 Mar 2018 02:26:39 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Michal Hocko cc: Andrew Morton , Johannes Weiner , "Kirill A. Shutemov" , Vlastimil Babka , linux-mm@kvack.org, LKML 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> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.