All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Roper <aroper-63aXycvo3TyHXe+LvDLADg@public.gmane.org>
To: "Michael Kerrisk (man-pages)"
	<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Possible typo in madvise(2)
Date: Tue, 01 Apr 2014 15:22:54 -0400	[thread overview]
Message-ID: <533B120E.1090406@umich.edu> (raw)
In-Reply-To: <533B0303.2000601-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Sorry for my confusion.

Checking other sources I see MADV_DONTNEED results in modifications to
private mappings being lost (the section on zero-filling non-file-backed
pages address this, in retrospect) which clearly changes semantics.

I had noticed that MADV_DONTFORK can result in different behavior after
a fork (eg, a parent mmaps a file, madvises dontfork, then forks, and
the child writes to the page -- with madvise, the page is updated,
visible to both processes, as is the backing file, without it the child
will segfault) and thought there might be a simple typo.

Alex

On 04/01/2014 02:18 PM, Michael Kerrisk (man-pages) wrote:
> On 03/28/2014 12:16 AM, Alex Roper wrote:
>> Version: Current git repo
>>
>> The first paragraph of DESCRIPTION states that madvise does not change
>> the semantics of an application except in the case of MADV_DONTNEED,
>> which I believe should read MADV_DONTFORK.
> 
> Alex, 
> 
> MADV_DONTNEED does change the semantics. But, could you say more
> about wht you think MADV_DONTFORK should have been written here 
> instead? (Perhaps some fix is needed to the page.)
> 
> Thanks,
> 
> Michael
> 
--
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:[~2014-04-01 19:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-27 23:16 Possible typo in madvise(2) Alex Roper
     [not found] ` <5334B14B.7070409-63aXycvo3TyHXe+LvDLADg@public.gmane.org>
2014-04-01 18:18   ` Michael Kerrisk (man-pages)
     [not found]     ` <533B0303.2000601-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-04-01 19:22       ` Alex Roper [this message]
     [not found]         ` <533B120E.1090406-63aXycvo3TyHXe+LvDLADg@public.gmane.org>
2014-04-01 19:25           ` Alex Roper

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=533B120E.1090406@umich.edu \
    --to=aroper-63axycvo3tyhxe+lvdladg@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.