From: Andreas Bombe <andreas.bombe@munich.netsurf.de>
To: Jerry Hong <jhong001@yahoo.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: how mmap() works?
Date: Sun, 1 Apr 2001 18:41:31 +0200 [thread overview]
Message-ID: <20010401184131.A2474@storm.local> (raw)
In-Reply-To: <20010329221451.27582.qmail@web4303.mail.yahoo.com>
In-Reply-To: <20010329221451.27582.qmail@web4303.mail.yahoo.com>; from jhong001@yahoo.com on Thu, Mar 29, 2001 at 02:14:51PM -0800
On Thu, Mar 29, 2001 at 02:14:51PM -0800, Jerry Hong wrote:
> Hi,
> mmap() creates a mmaped memory associated with a
> physical file. If a process updates the mmaped memory,
> Linux will updates the file "automatically". If this
> is the case, why do we need msync()?
For the same reason you might need fsync() or fdatasync(). To force
changes to be written now, without having to munmap() the area, so that
you have a gurantee that current data is on disk and will not be lost.
> If this is not
> the case, what is the interval between 2 "WRITE" (IO
> request operation) request to the physical file
> because it really updates the physical file somehow
> even without msync().
Without syncing, Linux writes whenever it thinks it's appropriate, e.g.
when pages have to be freed (I think also when the bdflush writes back
data, i.e. every 30 seconds by default).
--
Andreas E. Bombe <andreas.bombe@munich.netsurf.de> DSA key 0x04880A44
http://home.pages.de/~andreas.bombe/ http://linux1394.sourceforge.net/
next prev parent reply other threads:[~2001-04-01 19:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-29 22:14 how mmap() works? Jerry Hong
2001-03-29 22:38 ` J . A . Magallon
2001-04-01 16:41 ` Andreas Bombe [this message]
2001-04-01 20:28 ` Tim Hockin
2001-04-02 0:42 ` Andreas Bombe
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=20010401184131.A2474@storm.local \
--to=andreas.bombe@munich.netsurf.de \
--cc=jhong001@yahoo.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