Received: by 2002:ac0:8c8e:0:0:0:0:0 with SMTP id r14csp718306ima; Wed, 6 Feb 2019 07:16:54 -0800 (PST) X-Google-Smtp-Source: AHgI3IaY4fmqIqAE8ts2BxvU8oRuSjh4CpkSMZMw1bw0x3hk3du1mJgnRucd45XwQKeOPWjcTs4U X-Received: by 2002:a63:fd0a:: with SMTP id d10mr5374271pgh.164.1549466214343; Wed, 06 Feb 2019 07:16:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549466214; cv=none; d=google.com; s=arc-20160816; b=IL90ySEmFc1eMWs0GS2pY0wnRAI92M+kg7k891xN3tUyGd0TMBN+AMOROoC0qnRtsH rURHPB09ms6vCcBhEh6ZjkoX1Wjx7WAa5KMHCYOjoJwGijOJikiuIDWnpI0Shn2gQDI2 qFBlLQ0Rf447oK0tJUjCIPBv/oHI0CCfrwokXvahvICGbaxJ37hRy+tYmmv58jFMjeTc AIY1vhIf1ZsbK9d7WMPZwNDCyc3S6GtnCex+pRbuDn1V4kWENJKl2v2oG+ebxSvTglw8 4QpVpL7qfrvjdOAIr8wtMvUSdTpG42x4apljbUywZcHgQF+VNYJJaed4sCL7bSr8IvcA rvww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=aCkiqYNvxX1a9nJPU/Nbyv1sM4Ffext0Xrvmi7ouJ9w=; b=pJkBThZRA316rZxhp69tSFBzR2eMq+1HA9fFpdXy2bFuyTT7Ud1d1VK4B8zjGBZRPV Y7P2iNnvKrvAt8jbKtnffhsaif3bVHBFtVVi/Y3G+z9tj+TzmSVVpioCkUXI7pzpQUUG S1xEjwpbnLo42FWhHjf9oueZPFPqcKk4S9Q+PBsTe5frdut3VyEy+cQ5852JAd8RRUJ7 +DyOeMJrotnLNFe1Y35ewol+3ybXgAUTKz6q8T/YosfXIW9GZryJszVIkCY/rwbDi2xG l8uuyAz4bOGLnoWHUrWJGlBNQU6/sU1MHeH7pFoe0gB6o8ZHT7LeCyJdnJDFki1792RE X43A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=hz72O9Y3; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 6si1312811plc.241.2019.02.06.07.16.33; Wed, 06 Feb 2019 07:16:54 -0800 (PST) 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=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=hz72O9Y3; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729201AbfBFObV (ORCPT + 99 others); Wed, 6 Feb 2019 09:31:21 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:37089 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726732AbfBFObV (ORCPT ); Wed, 6 Feb 2019 09:31:21 -0500 Received: by mail-wr1-f65.google.com with SMTP id c8so979341wrs.4 for ; Wed, 06 Feb 2019 06:31:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=aCkiqYNvxX1a9nJPU/Nbyv1sM4Ffext0Xrvmi7ouJ9w=; b=hz72O9Y3uWIkSfq8uoOTQBadfjKQoIu+JKa5XW82YFIX8YDAvNP66Bge7LiyeLclz6 iPBBiywri00HnOkmsvfIc/NksPb07HSk8jXer0XE78ZW8L7mFpxmioQ+3EfmHPNsJTF5 JykLNcbGm7+TicqSMwxXi2uVkhSjTHKf3tRMBTcDtSC2qmmWv0LS2Ns9wLSFiI2qXghd i4EHmd1mj1w/ML9rhwhf4shb5qGzH76VAeA1OghmUVOb9Ttn6cUxUKMEv3kneBKuZvWh ffvmXiQLHx75vnbCqvd6U/66s1f1zBv9QW353zZVBTPVbgi1gEyY0r/2TMhKQhoHWj2f xmrg== 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:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=aCkiqYNvxX1a9nJPU/Nbyv1sM4Ffext0Xrvmi7ouJ9w=; b=dYidU45vGV4o2XkWUdYVJQWU1xc1Y6FLrQt7JFae5TQePEHUlmbC97wo1X+pX+Ji9c objJUet6uTUXiz+mJAbA6tBg9X01gBSQyicir7hT/Q4hZa1SKXZpBCXt8SI7usdTKG3A Cqd9VkG/BokY7n+/Iq3LEhqmm+LssJjJAXmwKm3bvI3K5eFf8R6HeQ3cWxkKq2F/InJs +nZ5pB0m88kgkRnxqQ+Fp83vGIknpwtS5lejm2RrMcknfKwvHf/WKIbzr5S+4F6QJJU6 sTYhPJ/rH7MjLhpRxFuZDLNzleLZg21H9WAo3hZvdDvT0PZWfWv8MuwyE7oVSCu5a2hX EgnQ== X-Gm-Message-State: AHQUAubNT8EFzsjABjnaeoZcX+cPyBj/oLN/UMCXb7Aw74LVT4gh+7hK /8vRK68D+vrPlZ3IyRCV6r3jUg== X-Received: by 2002:adf:fac4:: with SMTP id a4mr2062624wrs.110.1549463479578; Wed, 06 Feb 2019 06:31:19 -0800 (PST) Received: from localhost (p200300C44723CCF50E7AC8E3657171F5.dip0.t-ipconnect.de. [2003:c4:4723:ccf5:e7a:c8e3:6571:71f5]) by smtp.gmail.com with ESMTPSA id h135sm24452892wmd.21.2019.02.06.06.31.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Feb 2019 06:31:18 -0800 (PST) Date: Wed, 6 Feb 2019 15:31:17 +0100 From: Johannes Weiner To: Chris Down Cc: Andrew Morton , Michal Hocko , Tejun Heo , Roman Gushchin , Dennis Zhou , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, kernel-team@fb.com Subject: Re: [PATCH v4] mm: Make memory.emin the baseline for utilisation determination Message-ID: <20190206143117.GA30357@cmpxchg.org> References: <20190129191525.GB10430@chrisdown.name> <20190201051810.GA18895@chrisdown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190201051810.GA18895@chrisdown.name> User-Agent: Mutt/1.11.2 (2019-01-07) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 01, 2019 at 12:18:10AM -0500, Chris Down wrote: > Roman points out that when when we do the low reclaim pass, we scale the > reclaim pressure relative to position between 0 and the maximum > protection threshold. > > However, if the maximum protection is based on memory.elow, and > memory.emin is above zero, this means we still may get binary behaviour > on second-pass low reclaim. This is because we scale starting at 0, not > starting at memory.emin, and since we don't scan at all below emin, we > end up with cliff behaviour. > > This should be a fairly uncommon case since usually we don't go into the > second pass, but it makes sense to scale our low reclaim pressure > starting at emin. > > You can test this by catting two large sparse files, one in a cgroup > with emin set to some moderate size compared to physical RAM, and > another cgroup without any emin. In both cgroups, set an elow larger > than 50% of physical RAM. The one with emin will have less page > scanning, as reclaim pressure is lower. > > Signed-off-by: Chris Down > Suggested-by: Roman Gushchin > Cc: Johannes Weiner > Cc: Andrew Morton > Cc: Michal Hocko > Cc: Tejun Heo > Cc: Roman Gushchin > Cc: Dennis Zhou > Cc: linux-kernel@vger.kernel.org > Cc: cgroups@vger.kernel.org > Cc: linux-mm@kvack.org > Cc: kernel-team@fb.com Acked-by: Johannes Weiner