lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGsJ_4zaumNC7QT=J1NmmcWD4GE1XZtRZ3xVdsTfv8gLJPU7kA@mail.gmail.com>
Date:   Mon, 10 Jan 2022 11:59:40 +1300
From:   Barry Song <21cnbao@...il.com>
To:     Michal Hocko <mhocko@...e.com>
Cc:     Alexey Avramov <hakavlad@...ox.lv>,
        Vlastimil Babka <vbabka@...e.cz>,
        Andrew Morton <akpm@...ux-foundation.org>,
        ValdikSS <iam@...dikss.org.ru>, Linux-MM <linux-mm@...ck.org>,
        Linux Doc Mailing List <linux-doc@...r.kernel.org>,
        linux-fsdevel@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
        Jonathan Corbet <corbet@....net>, mcgrof@...nel.org,
        Kees Cook <keescook@...omium.org>,
        Iurii Zaikin <yzaikin@...gle.com>, oleksandr@...alenko.name,
        kernel@...mod.org, aros@....com, hakavlad@...il.com,
        Yu Zhao <yuzhao@...gle.com>,
        Johannes Weiner <hannes@...xchg.org>
Subject: Re: [PATCH] mm/vmscan: add sysctl knobs for protecting the working set

On Tue, Dec 7, 2021 at 4:51 PM Michal Hocko <mhocko@...e.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ