From: Michal Hocko <mhocko@kernel.org>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: Lucian Adrian Grijincu <lucian@fb.com>,
linux-mm@kvack.org, Souptick Joarder <jrdr.linux@gmail.com>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Rik van Riel <riel@fb.com>, Roman Gushchin <guro@fb.com>
Subject: Re: [PATCH v3] mm: memory: fix /proc/meminfo reporting for MLOCK_ONFAULT
Date: Mon, 23 Sep 2019 10:50:45 +0200 [thread overview]
Message-ID: <20190923085045.GC6016@dhcp22.suse.cz> (raw)
In-Reply-To: <20190917113550.v6nool7oizht66fx@box>
On Tue 17-09-19 14:35:50, Kirill A. Shutemov wrote:
> On Tue, Sep 17, 2019 at 12:15:19PM +0200, Michal Hocko wrote:
> > On Mon 16-09-19 18:26:19, Kirill A. Shutemov wrote:
> > > On Fri, Sep 13, 2019 at 02:11:19PM -0700, Lucian Adrian Grijincu wrote:
> > > > As pages are faulted in MLOCK_ONFAULT correctly updates
> > > > /proc/self/smaps, but doesn't update /proc/meminfo's Mlocked field.
> > >
> > > I don't think there's something wrong with this behaviour. It is okay to
> > > keep the page an evictable LRU list (and not account it to NR_MLOCKED).
> >
> > evictable list is an implementation detail. Having an overview about an
>
> s/evictable/unevictable/
>
> > amount of mlocked pages can be important. Lazy accounting makes this
> > more fuzzy and harder for admins to monitor.
> >
> > Sure it is not a bug to panic about but it certainly makes life of poor
> > admins harder.
>
> Good luck with making mlock accounting exact :P
I didn't say exact. All I am saying is that the more imprecise it will
be the harder it is for admin to make any sense of the value.
> For start, try to handle sanely trylock_page() failure under ptl while
> dealing with FOLL_MLOCK.
There are likely cases when accounting is problematic/impossible. But
those should be a minority.
> > If there is a pathological THP behavior possible then we should look
> > into that as well.
>
> There's nothing pathological about THP behaviour. See "MLOCKING
> Transparent Huge Pages" section in Documentation/vm/unevictable-lru.rst.
Thanks this documentation helps. I was worried there is something more
going on.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2019-09-23 8:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-13 21:11 Lucian Adrian Grijincu
2019-09-13 21:17 ` [Potential Spoof] " Roman Gushchin
2019-09-16 11:35 ` Michal Hocko
2019-09-16 21:34 ` Lucian Grijincu
2019-09-16 15:26 ` Kirill A. Shutemov
2019-09-17 10:15 ` Michal Hocko
2019-09-17 11:35 ` Kirill A. Shutemov
2019-09-23 8:50 ` Michal Hocko [this message]
2019-09-17 11:37 ` Kirill A. Shutemov
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=20190923085045.GC6016@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=guro@fb.com \
--cc=jrdr.linux@gmail.com \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lucian@fb.com \
--cc=riel@fb.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