Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp339924ybz; Wed, 29 Apr 2020 00:55:31 -0700 (PDT) X-Google-Smtp-Source: APiQypI61ekfO5qVwrzIGxgAFoagZCq1AidLWrfzda4tx0YJ+FyId4wMkVmTg2pclNS0F0sdO0PE X-Received: by 2002:a50:f381:: with SMTP id g1mr1296545edm.219.1588146931228; Wed, 29 Apr 2020 00:55:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588146931; cv=none; d=google.com; s=arc-20160816; b=r4sBmavL119vKpjf6tmdemlRwuuhWomtB1xl9vKFlXgsGc3ehDb1xVPI5L0QYJNN6Y Gd6LSFs7DytUx+0T51G+4n93JGqJrOxg//U5RUiCgw2LwSv9hTBVYgzOwYkwPYmxHIYb zTpvy74cafd4o+d+tY1BVKYMLpt9tvakmVDJX7u0ygiFvUOk+yqPUOPb7yNmAhvfdvrM Dko183A8g/Vs2EbXljQ9J3QHXoAf/V4WKd2n73dCRZrBya2l05HCTBMJOKP+R9DoUErw uNCQRaElbKcm5I92pUsh4Zydr8BYAifkeujsLmHXzuo5nFw+PVUoeOgtjVyIBUa2yS// qQdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=k9Jglz1u3FTlWShKsDC5UZgK6dTtCngjg8CjOSy29KA=; b=x9BtDXRrpnMeTXhR6VXzriOKDylDlsX/0m/NYcLRoYWRQF3PgGxPdnSPFaqHwx2cTp /tdtG5+MBOBdo303ZJQN9yS6f08BvNFM1hQqLI9B1O+DcVQdye3oqsY5KuvKFEaZkX5h IsyC2a0UXDIiokfqGycnyPIg2u+8nj+c3YKyM1uIwN4LG4D0HIbc2DRk/tvg3tA036FO 83mM0PIgWXoqw4+EEFbvap3SCSv/HZopkVV1VIp1NA+dKL2nM8ehLc3w7pTHDJAD2DNL 4/pDvo0RYxEMk21xLDLHgZ8H7l8hBYHibuq666gKIPgpe6+k4Qw2Zjw+Nd/m76YLgvTr 8eqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u21si3399309ejz.518.2020.04.29.00.55.07; Wed, 29 Apr 2020 00:55:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726676AbgD2Hvn (ORCPT + 99 others); Wed, 29 Apr 2020 03:51:43 -0400 Received: from mx2.suse.de ([195.135.220.15]:35452 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726355AbgD2Hvm (ORCPT ); Wed, 29 Apr 2020 03:51:42 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 486F0ABD7; Wed, 29 Apr 2020 07:51:40 +0000 (UTC) Subject: Re: [patch] mm, oom: stop reclaiming if GFP_ATOMIC will start failing soon To: David Rientjes , Tetsuo Handa Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mel Gorman References: <20200425172706.26b5011293e8dc77b1dccaf3@linux-foundation.org> <20200427133051.b71f961c1bc53a8e72c4f003@linux-foundation.org> <28e35a8b-400e-9320-5a97-accfccf4b9a8@suse.cz> From: Vlastimil Babka Message-ID: <31f1f84d-c5fe-824b-3c28-1a9ad69fcae5@suse.cz> Date: Wed, 29 Apr 2020 09:51:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/28/20 11:48 PM, David Rientjes wrote: > On Tue, 28 Apr 2020, Vlastimil Babka wrote: > > Yes, order-0 reclaim capture is interesting since the issue being reported > here is userspace going out to lunch because it loops for an unbounded > amount of time trying to get above a watermark where it's allowed to > allocate and other consumers are depleting that resource. > > We actually prefer to oom kill earlier rather than being put in a > perpetual state of aggressive reclaim that affects all allocators and the > unbounded nature of those allocations leads to very poor results for > everybody. Sure. My vague impression is that your (and similar cloud companies) kind of workloads are designed to maximize machine utilization, and overshooting and killing something as a result is no big deal. Then you perhaps have more probability of hitting this state, and on the other hand, even an occasional premature oom kill is not a big deal? My concers are workloads not designed in such a way, where premature oom kill due to temporary higher reclaim activity together with burst of incoming network packets will result in e.g. killing an important database. There, the tradeoff looks different. > I'm happy to scope this solely to an order-0 reclaim capture. I'm not > sure if I'm clear on whether this has been worked on before and patches > existed in the past? Andrew mentioned some. I don't recall any, so it might have been before my time. > Somewhat related to what I described in the changelog: we lost the "page > allocation stalls" artifacts in the kernel log for 4.15. The commit > description references an asynchronous mechanism for getting this > information; I don't know where this mechanism currently lives. >