Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp560135ybh; Thu, 12 Mar 2020 07:05:00 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvf4Jgrx1h/7SVZ4iwHrYuAa/NQumqAZv1PVy4rM/A+yPFpJ1NvIOWU5fZomSIB9rHGxhXo X-Received: by 2002:a4a:e70d:: with SMTP id y13mr4145960oou.19.1584021900607; Thu, 12 Mar 2020 07:05:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584021900; cv=none; d=google.com; s=arc-20160816; b=ULgteEBnbRPewrQ/fWheUngzas36inMTV48FxJVlDkdCyqQfGwHFjYz2vzNsSXj0ii ucAPkoTrCrAKccG5n73OIzb3Rng9eQPdLlr0rc1WDZJGYUsuOLGGHPvBqCySCsJik4qb gJRqESVEo81P9bp1HYFHfCu1I61avy19BQVf/h3aM/YbQiWZOSwQ18RRdqNnARQdLakD 7YadbOiMjOj1gw9SFk7Ca+6HHPfvGmRN7a4dQ7bkR0JUmmRO4/gvnHSfVqjdMbhfOU1L 2oeq3snxjSsCRUO7dhx/XKWFBfHfAb6MdUpDtYl4SC+qDS1ORCGvV8aK85CqHtZ1VdGn wR4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=gZ8EzvWOoYPssGlE3Bc08q7j/BuTfnqODyWmkhQlWkA=; b=nlIPiPQ0dr4Shpr/+BxVKufEZz0VPa7Itoem5Nz0nHlu3Kz3lE8cTxncZcjfS62X8S pibUeo2RuQ7NqG574ZxHNmt6SDWZVMFWft6pchu4kru+UXtq/ik+fU05thFJ+5elu7UR ezKjsTCa/+bx5h3O8ER36HP3jmXhqsvHI9CE8cKQCws5sbDmyNhnhV6xWwU5Eyuccool L2DkheYBWy54VHIaFKYMm4Zyzf/Amh0aDQ76jk1F7E0CzNZNZzOufvbBdItz1n9q0eRZ 2vQIjdcVGUrl7uJ0D3vIjr+s5CeK1TAq6VX93E52YkKzqywlg6IH90ApeQ5OFDGgIMxH HfTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=TfmuNTiD; 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 d3si2552720oia.236.2020.03.12.07.04.47; Thu, 12 Mar 2020 07:05:00 -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=TfmuNTiD; 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 S1727414AbgCLODa (ORCPT + 99 others); Thu, 12 Mar 2020 10:03:30 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:35229 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727179AbgCLODa (ORCPT ); Thu, 12 Mar 2020 10:03:30 -0400 Received: by mail-wr1-f67.google.com with SMTP id d5so7284857wrc.2 for ; Thu, 12 Mar 2020 07:03:28 -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; bh=gZ8EzvWOoYPssGlE3Bc08q7j/BuTfnqODyWmkhQlWkA=; b=TfmuNTiDZFVaKt1FsbjC8KD47kKTzeJiW0a5jYgMkGEHRDgSlpXWqwgP9A7Gf33Eld aml8lOwBZNhMGI52wgky/dJ3sd2Cvhad5IH02L91tKg6lIeYC0MhdZ2sdzNY2oSomsNY /ZHFB9z2P8NlaXCugSOWKuHmS2oJd8Dx2iKz8= 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; bh=gZ8EzvWOoYPssGlE3Bc08q7j/BuTfnqODyWmkhQlWkA=; b=RBKTVZX+oH9D1ASyF1L6jbHhKJjixBSuk5pcmjXPOXrYIkqsUOCDAvHCWN3UC9SnDR zqRpxwTcGsfV4xMbtjRlAH9QNkPPMvnTKI+yKJVArNZYyPLypQAjOK756qxmn0xiAHce Znb3D9Oyu/kjzshjr7Ia8MCvIU+JBI9Rjoq6ynAqa1ExNZBOVLdfdvdX04kOzNIBiX7O okMNWkBDyPgWpHh05IJddpchfAgnwehjN6VHXcgvHJYiJmK13JNpLn9GG67xTso+RHqD aXH5ZiLM95XHA/p9TWyFDOxO1yreQrU53WtPbu1n66rfpWy+hO+eysDiX9Ym4poKO4Hp eILw== X-Gm-Message-State: ANhLgQ2UN8rWVBNmPyTRW5RKf4BZzyAcYro1GE2MS9VhlTn3yCAxthSo pyEvSpOzmGGUDDAFURjsmXY+rg== X-Received: by 2002:adf:b3d6:: with SMTP id x22mr10936079wrd.242.1584021808040; Thu, 12 Mar 2020 07:03:28 -0700 (PDT) Received: from localhost ([89.32.122.5]) by smtp.gmail.com with ESMTPSA id d63sm12680261wmd.44.2020.03.12.07.03.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Mar 2020 07:03:27 -0700 (PDT) Date: Thu, 12 Mar 2020 14:03:26 +0000 From: Chris Down To: Matthew Wilcox Cc: Ivan Teterevkov , David Rientjes , "corbet@lwn.net" , "akpm@linux-foundation.org" , "mchehab+samsung@kernel.org" , "tglx@linutronix.de" , "jpoimboe@redhat.com" , "pawan.kumar.gupta@linux.intel.com" , "jgross@suse.com" , "oneukum@suse.com" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: [PATCH] mm/vmscan: add vm_swappiness configuration knobs Message-ID: <20200312140326.GA1701917@chrisdown.name> References: <20200312133636.GJ22433@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200312133636.GJ22433@bombadil.infradead.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Matthew Wilcox writes: >On Thu, Mar 12, 2020 at 12:48:22PM +0000, Ivan Teterevkov wrote: >> This is exactly what I'm trying to avoid: in some distros there is no way >> to tackle the configuration early enough, e.g. in systemd-based systems >> the systemd is the process that starts first and arranges memcg in a way >> it's configured, but unfortunately, it doesn't offer the swappiness knob. > >This sounds like a systemd problem. Have you talked to the systemd >people about fixing it in systemd? Hi there ;-) In general most of us maintaining cgroups in systemd run with cgroup v2, so this isn't a problem we run into in production. The swappiness controls in general don't make a whole lot of sense being distributed hierarchically, so they've been phased out entirely in cgroup v2. If there had been a patch years ago implementing this in systemd we'd probably have accepted it, but cgroup v1 is dying and I am really not in favour of adding more code to massage its rough edges. We already have enough problems generated by it already. However, the following kludge in tmpfiles.d should work to solve your immediate problem: w /sys/fs/cgroup/memory/system.slice/memory.swappiness - - - - value Taking my systemd hat off and putting my -mm hat on: let's not add more hacky APIs at cgroup v1's behest, or we'll be here until we're pushing up the daisies. Thanks, Chris