Linux Manual Pages development
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
To: "Michael Kerrisk (man-pages)"
	<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: mlockall(MCL_FUTURE) implies MAP_POPULATE
Date: Thu, 17 Dec 2015 09:54:28 -0800	[thread overview]
Message-ID: <20151217175428.GF5070@Sligo.logfs.org> (raw)
In-Reply-To: <56725EED.80502-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

On Thu, Dec 17, 2015 at 08:06:21AM +0100, Michael Kerrisk (man-pages) wrote:
> 
> So, I just realized that a recent change to the API, plus its
> associated documentation in the mlock(2) pages actually probably
> lessens the chance of this mistake. The next release of man-pages
> will include documentation of MCL_ONFAULT:
> 
>        MCL_CURRENT Lock  all pages which are currently mapped into the
>                    address space of the process.
> 
>        MCL_FUTURE  Lock all pages which will become  mapped  into  the
>                    address  space of the process in the future.  These
>                    could be, for instance, new  pages  required  by  a
>                    growing heap and stack as well as new memory-mapped
>                    files or shared memory regions.
> 
>        MCL_ONFAULT (since Linux 4.4)
>                    Used  together  with  MCL_CURRENT,  MCL_FUTURE,  or
>                    both.   Mark  all  current  (with  MCL_CURRENT)  or
>                    future (with MCL_FUTURE)  mappings  to  lock  pages
>                    when  they are faulted in.  When used with MCL_CUR‐
>                    RENT, all present pages are locked, but  mlockall()
>                    will  not  fault  in  non-present pages.  When used
>                    with MCL_FUTURE, all future mappings will be marked
>                    to  lock  pages  when they are faulted in, but they
>                    will not be populated by the lock when the  mapping
>                    is  created.   MCL_ONFAULT must be used with either
>                    MCL_CURRENT or MCL_FUTURE or both.
> 
> Do you think that text helps?

Yes.  It seems foolproof for the one fool that is me.

Thank you!

Jörn

--
It does not matter how slowly you go, so long as you do not stop.
-- Confucius
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2015-12-17 17:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20151028010510.GF21688@Sligo.logfs.org>
     [not found] ` <CAFs=pgb+LatY8WKV+sZsvgUGMtzVsSxwX0FTKx3u5Nuj1AiOYg@mail.gmail.com>
     [not found]   ` <CAFs=pgb+LatY8WKV+sZsvgUGMtzVsSxwX0FTKx3u5Nuj1AiOYg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-12-16 18:50     ` mlockall(MCL_FUTURE) implies MAP_POPULATE Jörn Engel
     [not found]       ` <20151216185006.GA31243-cauy6bAtduhuHSXMRYw1Og@public.gmane.org>
2015-12-17  7:06         ` Michael Kerrisk (man-pages)
     [not found]           ` <56725EED.80502-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-12-17 17:54             ` Jörn Engel [this message]

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=20151217175428.GF5070@Sligo.logfs.org \
    --to=joern-bhel68plqrggvpxpguhicg@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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