From: Barry Song <21cnbao@gmail.com>
To: Michal Hocko <mhocko@suse.com>
Cc: Alexey Avramov <hakavlad@inbox.lv>,
Vlastimil Babka <vbabka@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>,
ValdikSS <iam@valdikss.org.ru>, Linux-MM <linux-mm@kvack.org>,
Linux Doc Mailing List <linux-doc@vger.kernel.org>,
linux-fsdevel@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
mcgrof@kernel.org, Kees Cook <keescook@chromium.org>,
Iurii Zaikin <yzaikin@google.com>,
oleksandr@natalenko.name, kernel@xanmod.org, aros@gmx.com,
hakavlad@gmail.com, Yu Zhao <yuzhao@google.com>,
Johannes Weiner <hannes@cmpxchg.org>
Subject: Re: [PATCH] mm/vmscan: add sysctl knobs for protecting the working set
Date: Mon, 10 Jan 2022 11:59:40 +1300 [thread overview]
Message-ID: <CAGsJ_4zaumNC7QT=J1NmmcWD4GE1XZtRZ3xVdsTfv8gLJPU7kA@mail.gmail.com> (raw)
In-Reply-To: <Ya3fG2rp+860Yb+t@dhcp22.suse.cz>
On Tue, Dec 7, 2021 at 4:51 PM Michal Hocko <mhocko@suse.com> wrote:
>
> On Fri 03-12-21 22:27:10, Alexey Avramov wrote:
> > >I'd also like to know where that malfunction happens in this case.
> >
> > User-space processes need to always access shared libraries to work.
> > It can be tens or hundreds of megabytes, depending on the type of workload.
> > This is a hot cache, which is pushed out and then read leads to thrashing.
> > There is no way in the kernel to forbid evicting the minimum file cache.
> > This is the problem that the patch solves. And the malfunction is exactly
> > that - the inability of the kernel to hold the minimum amount of the
> > hottest cache in memory.
>
> Executable pages are a protected resource already page_check_references.
> Shared libraries have more page tables pointing to them so they are more
> likely to be referenced and thus kept around. What is the other memory
> demand to push those away and cause a trashing?
I've heard a lot of complaints that shared libraries can be swapped
out and thrashing.
it seems page_check_references won't be able to relieve the thrashing for them.
on the other hand, exec pages could have a very big mapcount, that means reverse
mapping of them will take a lot of time while they are reclaimed, so
this makes the user
experience even much worse while memory is under high pressure.
Are we actually able to make mapcount a factor for memory reclaim in
some way? The
difficulty might be that a big mapcount doesn't necessarily mean the
page is active. for
For example, all processes mapping the page might be inactive. but
reclaiming pages
with a big mapcount has been a big pain as far as i know.
Thanks
Barry
next prev parent reply other threads:[~2022-01-09 22:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-30 11:16 [PATCH] mm/vmscan: add sysctl knobs for protecting the working set Alexey Avramov
2021-11-30 15:28 ` Luis Chamberlain
2021-11-30 18:56 ` Oleksandr Natalenko
2021-12-01 15:51 ` Alexey Avramov
2021-12-02 18:05 ` ValdikSS
2021-12-02 21:58 ` Andrew Morton
2021-12-03 11:59 ` Vlastimil Babka
2021-12-03 13:27 ` Alexey Avramov
2021-12-06 9:59 ` Michal Hocko
2022-01-09 22:59 ` Barry Song [this message]
2021-12-03 14:01 ` Oleksandr Natalenko
2021-12-12 20:15 ` Alexey Avramov
2021-12-13 9:06 ` Barry Song
2021-12-13 9:07 ` Michal Hocko
2021-12-13 8:38 ` Barry Song
2022-01-25 8:19 ` ValdikSS
2022-02-12 0:01 ` Barry Song
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='CAGsJ_4zaumNC7QT=J1NmmcWD4GE1XZtRZ3xVdsTfv8gLJPU7kA@mail.gmail.com' \
--to=21cnbao@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=aros@gmx.com \
--cc=corbet@lwn.net \
--cc=hakavlad@gmail.com \
--cc=hakavlad@inbox.lv \
--cc=hannes@cmpxchg.org \
--cc=iam@valdikss.org.ru \
--cc=keescook@chromium.org \
--cc=kernel@xanmod.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mcgrof@kernel.org \
--cc=mhocko@suse.com \
--cc=oleksandr@natalenko.name \
--cc=vbabka@suse.cz \
--cc=yuzhao@google.com \
--cc=yzaikin@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;
as well as URLs for NNTP newsgroup(s).