Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp1068532img; Fri, 22 Mar 2019 15:02:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqyRDvLhmQSLuZBcJ41LCUwfnKuKZ4KbmgR6V49tc+GYlP5wh0mIR93aw8d6w86jtVUpQBfa X-Received: by 2002:a63:5a47:: with SMTP id k7mr7359843pgm.174.1553292131426; Fri, 22 Mar 2019 15:02:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553292131; cv=none; d=google.com; s=arc-20160816; b=chBWv0m5kxds3CIII3k78ZmWu6vDXv+O/xZFcORiIM8I4TlyeLPU3MDmIz5Io3kMaF SVM4LXRkzqwDsQOI21feer57OcxLs5eX5JNroM/kMS3UWrtKB02antjJYB2oxmDjVzbb MALE4i3uARfhCJiORSaSbAbRH7hXbA9AjHvc07IaW44Gd/W2IU/xz08gIlu0o8MryjIK HVJLNuqj+XmYkRpBESkOkigp2ghqQYhaV6VouM283i9bC3UXZT8G/m3o9ALt6P33DeyH LEL41mbpOg4dsHCF8nQ8LM4m5mtw/vN2p9u6rMvDAuaToBUDWv6r9rubqDhpbbHT9PXm l18g== 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=z3kNb4x6nZaDJzrLCkv/8bMkNzuRCuubIRRX4PjKw9k=; b=gHcratBwhBybodOcvrUAB7Yuf2YcveTsK76hwO6T5pvVfb+0ZZY90xpkW0XxuHIXRJ ZCfLlWF0JgiYpOHSOjsOJI0RCcX95bpv54hmJjRXS9/eXpZA3xDm87GtdkgbKqKOs7HD 0n14hjeidj7SnmRaJsST01a9mFnNBATcinjVSy5MveHACp8YxabUcVUoS0qWLoA6C+S9 bqFUqurhYRonXA3eDxDL8GsTyJQq9+vxhZy/DOo+2cp02iDMkCdzYj3SC4BrTLQBlzUB ihbCso+DoRDURJpML1QaSjigWToB3de2JbnjT1Ho+lPY6sEJxa+A7hAFgdbePa+nw8Tw aj8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=t33VxRIu; 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=NONE sp=NONE dis=NONE) header.from=chrisdown.name Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w61si2109458plb.186.2019.03.22.15.01.56; Fri, 22 Mar 2019 15:02:11 -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=@chrisdown.name header.s=google header.b=t33VxRIu; 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=NONE sp=NONE dis=NONE) header.from=chrisdown.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727944AbfCVWAu (ORCPT + 99 others); Fri, 22 Mar 2019 18:00:50 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:34323 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727440AbfCVWAt (ORCPT ); Fri, 22 Mar 2019 18:00:49 -0400 Received: by mail-wr1-f68.google.com with SMTP id p10so3931783wrq.1 for ; Fri, 22 Mar 2019 15:00:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=z3kNb4x6nZaDJzrLCkv/8bMkNzuRCuubIRRX4PjKw9k=; b=t33VxRIuRm3bprIjzdNlkZlPsKCoiKyBSPHzogx7bBAS/0Me5ORQuRWJPkoVAb30lf WWGBbCUiJE/BUNBvPVoeD/FvsAqwyOPJrFQNHfPKqCwFogqxeBdfod9IT8SeXk83lwBq U9Nu+yf0n+hoiMALOIPPIDxC2I56pXMvLTrQs= 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=z3kNb4x6nZaDJzrLCkv/8bMkNzuRCuubIRRX4PjKw9k=; b=M1NT8wfHYU1Imeoo2AQ8eoDB0BBVo3xD8hlj5Y3PQvC0TPNQnvyWaiVR565+utik1C V3ke+eu6W/O9fjtecdSm16fQXXkDZ+59bK9AhKhERS2Ride221Q5nYzwXzKvuqVqZlOg C9oNd8cZgEJNgJClbJ/9vp7i319kjDSWKGGMfeH2r5zznTXSjke0/NwYHGvS0VpSDtuu OROVzAmQ8/O+NCkFN7pkYmrMGk7xIPeKA5Hl5jEZK7UeTzqv2WTu4wDAN79Hy1PSjguf nTBRu87khvSg8RFJY1TapD81Z4Niva7wFJ4AP8fxO+AwIs0BnmZBK38yf4WHsemt5Pfq hZrg== X-Gm-Message-State: APjAAAWu2Yi3mnAWhyYdxSnBLuFVc39Kf5KgKRIyutCx7RJinwyH+nfw DpAQ7Pso/Rsd1TtUHZ9KJKuDAg== X-Received: by 2002:adf:ea81:: with SMTP id s1mr7629173wrm.277.1553292047861; Fri, 22 Mar 2019 15:00:47 -0700 (PDT) Received: from localhost ([89.36.66.5]) by smtp.gmail.com with ESMTPSA id 93sm18584487wrh.15.2019.03.22.15.00.46 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 22 Mar 2019 15:00:46 -0700 (PDT) Date: Fri, 22 Mar 2019 22:00:46 +0000 From: Chris Down To: Andrew Morton Cc: Johannes Weiner , 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 REBASED] mm, memcg: Make scan aggression always exclude protection Message-ID: <20190322220046.GA7667@chrisdown.name> References: <20190228213050.GA28211@chrisdown.name> <20190322160307.GA3316@chrisdown.name> <20190322131015.05edf9fac014f4cacf10dd2a@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190322131015.05edf9fac014f4cacf10dd2a@linux-foundation.org> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andrew Morton writes: >Could you please provide more description of the effect this has upon >userspace? Preferably in real-world cases. What problems were being >observed and how does this improve things? Sure! The previous patch's behaviour isn't so much problematic as it is just not as featureful as it could be. This change doesn't change the experience for the user in the normal case too much. One benefit is that it replaces the (somewhat arbitrary) 100% cutoff with an indefinite slope, which makes it easier to ballpark a memory.low value. As well as this, the old methodology doesn't quite apply generically to machines with varying amounts of physical memory. Let's say we have a top level cgroup, workload.slice, and another top level cgroup, system-management.slice. We want to roughly give 12G to system-management.slice, so on a 32GB machine we set memory.low to 20GB in workload.slice, and on a 64GB machine we set memory.low to 52GB. However, because these are relative amounts to the total machine size, while the amount of memory we want to generally be willing to yield to system.slice is absolute (12G), we end up putting more pressure on system.slice just because we have a larger machine and a larger workload to fill it, which seems fairly unintuitive. With this new behaviour, we don't end up with this unintended side effect.