From: Roman Gushchin <guro@fb.com>
To: Chris Down <chris@chrisdown.name>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>, Tejun Heo <tj@kernel.org>,
Dennis Zhou <dennis@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"cgroups@vger.kernel.org" <cgroups@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Kernel Team <Kernel-team@fb.com>
Subject: Re: [PATCH] mm, memcg: Make scan aggression always exclude protection
Date: Fri, 1 Mar 2019 00:03:06 +0000 [thread overview]
Message-ID: <20190301000300.GA16802@tower.DHCP.thefacebook.com> (raw)
In-Reply-To: <20190228213050.GA28211@chrisdown.name>
On Thu, Feb 28, 2019 at 09:30:50PM +0000, Chris Down wrote:
> This patch is an incremental improvement on the existing
> memory.{low,min} relative reclaim work to base its scan pressure
> calculations on how much protection is available compared to the current
> usage, rather than how much the current usage is over some protection
> threshold.
>
> Previously the way that memory.low protection works is that if you are
> 50% over a certain baseline, you get 50% of your normal scan pressure.
> This is certainly better than the previous cliff-edge behaviour, but it
> can be improved even further by always considering memory under the
> currently enforced protection threshold to be out of bounds. This means
> that we can set relatively low memory.low thresholds for variable or
> bursty workloads while still getting a reasonable level of protection,
> whereas with the previous version we may still trivially hit the 100%
> clamp. The previous 100% clamp is also somewhat arbitrary, whereas this
> one is more concretely based on the currently enforced protection
> threshold, which is likely easier to reason about.
>
> There is also a subtle issue with the way that proportional reclaim
> worked previously -- it promotes having no memory.low, since it makes
> pressure higher during low reclaim. This happens because we base our
> scan pressure modulation on how far memory.current is between memory.min
> and memory.low, but if memory.low is unset, we only use the overage
> method. In most cromulent configurations, this then means that we end up
> with *more* pressure than with no memory.low at all when we're in low
> reclaim, which is not really very usable or expected.
>
> With this patch, memory.low and memory.min affect reclaim pressure in a
> more understandable and composable way. For example, from a user
> standpoint, "protected" memory now remains untouchable from a reclaim
> aggression standpoint, and users can also have more confidence that
> bursty workloads will still receive some amount of guaranteed
> protection.
Looks good to me: the overall logic is fine, and codewise it's so much
cleaner than the previous version.
Reviewed-by: Roman Gushchin <guro@fb.com>
Thanks, Chris!
next prev parent reply other threads:[~2019-03-01 0:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-28 21:30 [PATCH] mm, memcg: Make scan aggression always exclude protection Chris Down
2019-03-01 0:03 ` Roman Gushchin [this message]
2019-03-22 16:03 ` [PATCH REBASED] " Chris Down
2019-03-22 20:10 ` Andrew Morton
2019-03-22 22:00 ` Chris Down
2019-03-22 22:29 ` Roman Gushchin
2019-03-22 22:49 ` Roman Gushchin
2019-03-22 22:51 ` Chris Down
2019-03-22 22:49 ` Chris Down
2019-03-22 23:01 ` Roman Gushchin
2019-03-22 23:51 ` Chris Down
2019-05-30 6:12 ` Michal Hocko
2019-05-30 6:44 ` Chris Down
2019-05-30 6:51 ` Michal Hocko
2019-05-30 20:52 ` Chris Down
2019-05-31 6:28 ` Michal Hocko
2019-05-31 19:27 ` Chris Down
2019-07-16 17:10 ` Johannes Weiner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190301000300.GA16802@tower.DHCP.thefacebook.com \
--to=guro@fb.com \
--cc=Kernel-team@fb.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=chris@chrisdown.name \
--cc=dennis@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.