From: hpa@zytor.com (H. Peter Anvin)
To: linux-kernel@vger.kernel.org
Subject: Re: msync() needed before munmap() when writing to shared mapping?
Date: Sat, 17 Apr 2004 20:23:21 +0000 (UTC) [thread overview]
Message-ID: <c5s3np$6ct$1@terminus.zytor.com> (raw)
In-Reply-To: 20040416220223.GA27084@mail.shareable.org
Followup to: <20040416220223.GA27084@mail.shareable.org>
By author: Jamie Lokier <jamie@shareable.org>
In newsgroup: linux.dev.kernel
>
> > munmap() and fsync() or msync() will flush it to disk; there is no
> > reason munmap() should unless perhaps the file was opened O_SYNC.
>
> That was talking about flushing data all the way to disk. The
> implication of hpa's response is that munmap() does propagate the
> dirty bits from the page table to the file. That is the obvious
> behaviour, and what I've always assumed.
>
Obvious behaviour, and required by POSIX.
-hpa
prev parent reply other threads:[~2004-04-17 20:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-16 22:02 msync() needed before munmap() when writing to shared mapping? Jamie Lokier
2004-04-16 22:46 ` Andrew Morton
2004-04-16 23:10 ` Jamie Lokier
2004-04-16 23:59 ` Andrew Morton
2004-04-16 23:55 ` Hugh Dickins
2004-04-17 20:23 ` H. Peter Anvin [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='c5s3np$6ct$1@terminus.zytor.com' \
--to=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.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