From: Johannes Weiner <hannes@cmpxchg.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
kernel-team@fb.com, CGEL <cgel.zte@gmail.com>,
Minchan Kim <minchan@google.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>, Yu Zhao <yuzhao@google.com>
Subject: Re: [PATCH] mm: page_io: fix psi memory pressure error on cold swapins
Date: Tue, 15 Feb 2022 11:13:48 -0500 [thread overview]
Message-ID: <YgvRPJh44VkX1+JV@cmpxchg.org> (raw)
In-Reply-To: <20220214144805.fa389f495fdfb07b40526f70@linux-foundation.org>
On Mon, Feb 14, 2022 at 02:48:05PM -0800, Andrew Morton wrote:
> On Mon, 14 Feb 2022 16:49:21 -0500 Johannes Weiner <hannes@cmpxchg.org> wrote:
>
> > Once upon a time, all swapins counted toward memory pressure[1]. Then
> > Joonsoo introduced workingset detection for anonymous pages and we
> > gained the ability to distinguish hot from cold swapins[2][3]. But we
> > failed to update swap_readpage() accordingly, and now we account
> > partial memory pressure in the swapin path of cold memory.
> >
> > Not for all situations - which adds more inconsistency: paths using
> > the conventional submit_bio() and lock_page() route will not see much
> > pressure - unless storage itself is heavily congested and the bio
> > submissions stall. ZRAM and ZSWAP do most of the work directly from
> > swap_readpage() and will see all swapins reflected as pressure.
> >
> > Restore consistency by making all swapin stall accounting conditional
> > on the page actually being part of the workingset.
>
> Does this have any known runtime effects? If not, can we
> hazard a guess?
hm, how about this paragrah between "not for all situations" and
"restore consistency":
IOW, a workload doing cold swapins could see little to no pressure
reported with on-disk swap, but potentially high pressure with a zram
or zswap backend. That confuses any psi-based health monitoring, load
shedding, proactive reclaim, or userspace OOM killing schemes that
might be in place for the workload.
next prev parent reply other threads:[~2022-02-15 16:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-14 21:49 Johannes Weiner
2022-02-14 22:48 ` Andrew Morton
2022-02-15 16:13 ` Johannes Weiner [this message]
2022-02-15 17:44 ` Minchan Kim
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=YgvRPJh44VkX1+JV@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=akpm@linux-foundation.org \
--cc=cgel.zte@gmail.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@google.com \
--cc=yuzhao@google.com \
/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