From: Michal Hocko <mhocko@kernel.org>
To: Matthew Garrett <mjg59@google.com>
Cc: linux-mm@kvack.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux API <linux-api@vger.kernel.org>
Subject: Re: [PATCH V2] mm: Allow userland to request that the kernel clear memory on release
Date: Mon, 29 Apr 2019 17:44:58 -0400 [thread overview]
Message-ID: <20190429214458.GB3715@dhcp22.suse.cz> (raw)
In-Reply-To: <CACdnJutweLKsir_r9EgP9g=Eih-hbhq20N8zHzKawR8=awnENw@mail.gmail.com>
On Fri 26-04-19 11:08:44, Matthew Garrett wrote:
> On Thu, Apr 25, 2019 at 10:25 PM Michal Hocko <mhocko@kernel.org> wrote:
> >
> > On Thu 25-04-19 13:39:01, Matthew Garrett wrote:
> > > Yes, given MADV_DONTDUMP doesn't imply mlock I thought it'd be more
> > > consistent to keep those independent.
> >
> > Do we want to fail madvise call on VMAs that are not mlocked then? What
> > if the munlock happens later after the madvise is called?
>
> I'm not sure if it's strictly necessary. We already have various
> combinations of features that only make sense when used together and
> which can be undermined by later actions. I can see the appeal of
> designing this in a way that makes it harder to misuse, but is that
> worth additional implementation complexity?
If the complexity is not worth the usual usecases then this should be
really documented and noted that without an mlock you are not getting
the full semantic and you can leave memory behind on the swap partition.
I cannot judge how much that matter but it certainly looks half feature
to me but if nobody is going to use the madvise without mlock then it
looks certainly much easier to implement.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2019-04-29 21:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CACdnJuup-y1xAO93wr+nr6ARacxJ9YXgaceQK9TLktE7shab1w@mail.gmail.com>
[not found] ` <20190424211038.204001-1-matthewgarrett@google.com>
2019-04-25 12:14 ` [PATCH V2] mm: Allow userland to request that the kernel clear memory on release Michal Hocko
2019-04-25 12:37 ` Michal Hocko
2019-04-25 20:39 ` Matthew Garrett
2019-04-26 5:25 ` Michal Hocko
2019-04-26 18:08 ` Matthew Garrett
2019-04-29 21:44 ` Michal Hocko [this message]
2019-04-25 12:40 ` Vlastimil Babka
2019-04-25 20:45 ` Matthew Garrett
2019-04-25 12:42 ` Jann Horn
2019-04-25 20:43 ` Matthew Garrett
2019-04-26 5:31 ` Michal Hocko
2019-04-26 13:33 ` Jann Horn
2019-04-26 13:47 ` Michal Hocko
2019-04-26 14:03 ` Jann Horn
2019-04-26 14:08 ` Michal Hocko
2019-04-25 22:58 ` [PATCH V3] " Matthew Garrett
2019-04-26 7:45 ` Vlastimil Babka
2019-04-26 18:10 ` Matthew Garrett
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=20190429214458.GB3715@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mjg59@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).