linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Christoph Lameter <clameter@engr.sgi.com>
Cc: hugh@veritas.com, linux-mm@kvack.org
Subject: Re: unuse_pte: set pte dirty if the page is dirty
Date: Mon, 27 Feb 2006 18:21:37 -0800	[thread overview]
Message-ID: <20060227182137.3106a4cf.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0602271755070.14367@schroedinger.engr.sgi.com>

Christoph Lameter <clameter@engr.sgi.com> wrote:
>
> On Mon, 27 Feb 2006, Andrew Morton wrote:
> 
> > Are we sure this is race-free?  Say, someone is in the process of cleaning
> > the page?  munmap, conceivably swapout?  We end up with a dirty pte
> > pointing at a now-clean page.  The page will later become dirty again.  Is
> > that a problem?  It would generate a surprise if the vma had ben set
> > read-only in the interim, for example.
> 
> munmap sets the dirty bit in pages rather than clearing the dirty bits.
> 
> If we would set a dirty bit in a pte pointing to a now clean page then 
> unmapping (or the swaper) will mark the page dirty again and its going to 
> be rewritten again.

Precisely.

And will that crash the kernel, corrupt swapspace, or any other such
exciting things?

There are cases (eg, mprotect) in which a subsequent page-dirtying is
"impossible".  Only we've now gone and made it possible.  The worst part of
it is that we're made it possible in exceedingly rare circumstances.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2006-02-28  2:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-28  1:33 Christoph Lameter
2006-02-28  1:53 ` Andrew Morton
2006-02-28  1:57   ` Christoph Lameter
2006-02-28  2:21     ` Andrew Morton [this message]
2006-02-28  4:20       ` Christoph Lameter
2006-02-28  4:39         ` Andrew Morton
2006-02-28  5:32           ` Christoph Lameter
2006-02-28 14:05             ` Hugh Dickins
2006-02-28 16:06               ` Christoph Lameter

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=20060227182137.3106a4cf.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=clameter@engr.sgi.com \
    --cc=hugh@veritas.com \
    --cc=linux-mm@kvack.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