From: "H. Peter Anvin" <hpa@zytor.com>
To: linux-kernel@vger.kernel.org
Subject: Re: Memory mapped files question
Date: 14 Apr 2003 11:07:09 -0700 [thread overview]
Message-ID: <b7etcd$s0n$1@cesium.transmeta.com> (raw)
In-Reply-To: 11640000.1050332688@[10.10.2.4]
Followup to: <11640000.1050332688@[10.10.2.4]>
By author: "Martin J. Bligh" <mbligh@aracnet.com>
In newsgroup: linux.dev.kernel
>
> > Martin, something which was not mentioned last week (I've just checked).
> >
> > It's OK if we never write to disk unless explicitely told, but will we writeback
> > when we munmap?
>
> Don't know for sure - you'd have to read the code (do_munmap) ... I couldn't
> see anything there at a quick glance. However, I'd guess we don't write it,
> as multiple people could have the file mapped, or we could remap it
> again from somewhere. Presumably the standard LRU will just flush it out.
>
munmap() and fsync() or msync() will flush it to disk; there is no
reason munmap() should unless perhaps the file was opened O_SYNC.
-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64
next prev parent reply other threads:[~2003-04-14 18:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-14 3:57 Memory mapped files question Bryan Shumsky
2003-04-14 14:36 ` Martin J. Bligh
2003-04-14 15:07 ` Antonio Vargas
2003-04-14 15:04 ` Martin J. Bligh
2003-04-14 18:07 ` H. Peter Anvin [this message]
2003-04-14 20:39 ` Chris Friesen
2003-04-14 21:12 ` H. Peter Anvin
2003-04-14 19:31 Perez-Gonzalez, Inaky
2003-04-14 19:42 ` Bryan Shumsky
2003-04-14 19:53 ` Alan Cox
2003-04-14 21:24 ` Chris Friesen
2003-04-14 20:13 ` Richard B. Johnson
2003-04-14 20:27 ` Frank van Maarseveen
2003-04-14 20:52 ` Richard B. Johnson
2003-04-14 22:08 ` H. Peter Anvin
2003-04-15 4:56 ` Jamie Lokier
2003-04-15 5:30 ` H. Peter Anvin
2003-04-14 19:50 Perez-Gonzalez, Inaky
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='b7etcd$s0n$1@cesium.transmeta.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;
as well as URLs for NNTP newsgroup(s).