[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200312140326.GA1701917@chrisdown.name>
Date: Thu, 12 Mar 2020 14:03:26 +0000
From: Chris Down <chris@...isdown.name>
To: Matthew Wilcox <willy@...radead.org>
Cc: Ivan Teterevkov <ivan.teterevkov@...anix.com>,
David Rientjes <rientjes@...gle.com>,
"corbet@....net" <corbet@....net>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"mchehab+samsung@...nel.org" <mchehab+samsung@...nel.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"jpoimboe@...hat.com" <jpoimboe@...hat.com>,
"pawan.kumar.gupta@...ux.intel.com"
<pawan.kumar.gupta@...ux.intel.com>,
"jgross@...e.com" <jgross@...e.com>,
"oneukum@...e.com" <oneukum@...e.com>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: Re: [PATCH] mm/vmscan: add vm_swappiness configuration knobs
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
Powered by blists - more mailing lists