From: Rik van Riel <riel@surriel.com>
To: Tejun Heo <tj@kernel.org>, Roman Gushchin <guro@fb.com>
Cc: linux-mm@kvack.org, Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>, Shaohua Li <shli@fb.com>,
linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
kernel-team@fb.com
Subject: Re: [PATCH] mm: allow to decrease swap.max below actual swap usage
Date: Mon, 16 Apr 2018 11:07:22 -0400 [thread overview]
Message-ID: <1523891242.27555.9.camel@surriel.com> (raw)
In-Reply-To: <20180416013902.GD1911913@devbig577.frc2.facebook.com>
[-- Attachment #1: Type: text/plain, Size: 1065 bytes --]
On Sun, 2018-04-15 at 18:39 -0700, Tejun Heo wrote:
> Hello, Roman.
>
> The reclaim behavior is a bit worrisome.
>
> * It disables an entire swap area while reclaim is in progress. Most
> systems only have one swap area, so this would disable allocating
> new swap area for everyone.
That could easily cause OOM kills on systems.
I prefer Tejun's simple approach, of having
the system slowly reduce swap use below the
new maximum limit.
> * The reclaim seems very inefficient. IIUC, it has to read every
> swap
> page to see whether the page belongs to the target memcg and for
> each matching page, which involves walking page mm's and page
> tables.
One of my Outreachy interns, Kelley Nielsen,
worked on making swap reclaim more efficient
by scanning the virtual address space of
processes.
Unfortunately, we ran into some unforseen
issues with that approach that we never managed
to sort out :(
> Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Rik van Riel <riel@surriel.com>
--
All Rights Reversed.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2018-04-16 15:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-12 13:27 [PATCH] mm: allow to decrease swap.max below actual swap usage Roman Gushchin
2018-04-16 1:39 ` Tejun Heo
2018-04-16 15:07 ` Rik van Riel [this message]
2018-04-17 11:06 ` Roman Gushchin
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=1523891242.27555.9.camel@surriel.com \
--to=riel@surriel.com \
--cc=cgroups@vger.kernel.org \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=shli@fb.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox