public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: davidsen@tmr.com (bill davidsen)
To: linux-kernel@vger.kernel.org
Subject: Re: how do file-mapped (mmapped) pages become dirty?
Date: 28 Oct 2003 18:07:52 GMT	[thread overview]
Message-ID: <bnmb9o$r2q$1@gatekeeper.tmr.com> (raw)
In-Reply-To: 006901c39d50$0b1313d0$2501a8c0@CARTMAN

In article <006901c39d50$0b1313d0$2501a8c0@CARTMAN>,
Amir Hermelin <amir@montilio.com> wrote:

| When a process mmaps a file, how does the kernel know the memory has been
| written to (and hence the page is dirty)? Is this done by setting the
| protected flag, and when the memory is first written to it's set to dirty?
| What function is responsible for this setting? And when will the page be
| written back to disk (i.e. where's the flusher located)?

At least on x86, the CPU sets the dirty bit on write, although once
upon a time less capable CPUs did it the way you suggest. That said, I
think copy on write is still done the way you suggest, but look at the
code if you really care. Or wait for someone to tell me I'm wrong ;-)

-- 
bill davidsen <davidsen@tmr.com>
  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.

      parent reply	other threads:[~2003-10-28 18:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-28 12:35 how do file-mapped (mmapped) pages become dirty? Amir Hermelin
2003-10-28 15:00 ` Helge Hafting
2003-10-28 15:26   ` Chris Friesen
2003-10-28 15:45     ` Richard B. Johnson
2003-10-28 16:23       ` Chris Friesen
2003-10-28 15:39 ` Richard B. Johnson
2003-10-28 18:07 ` bill davidsen [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='bnmb9o$r2q$1@gatekeeper.tmr.com' \
    --to=davidsen@tmr.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