linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@engr.sgi.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: Andrew Morton <akpm@osdl.org>, linux-mm@kvack.org
Subject: Re: unuse_pte: set pte dirty if the page is dirty
Date: Tue, 28 Feb 2006 08:06:02 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0602280756130.18031@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0602281346060.7504@goblin.wat.veritas.com>

On Tue, 28 Feb 2006, Hugh Dickins wrote:

> I shared Andrew's unease, but couldn't put my finger on any actual
> problem.  But in the course of writing a much more hesitant reply,
> came to realize the patch is just bogus.  Did you ever measure any
> improvement from it, on any architecture?  0% is my estimate.

I have not actually measured it. What I see though are dirty pages
referred to by ptes that are not dirty after page migration. The
ptes were dirty before migration.
 
> I was recommending that the VM_WRITE test be replaced by a pte_write
> test, when I remembered that vm_page_prot on any vma which contains
> anonymous pages (excepting the very rare Linus ptrace case) will not
> grant write access (see comment above unuse_pte).  So if this pte is
> actually written to afterwards, you'll have to handle a write fault
> on it, won't you?  No saving whatever from presetting dirty - or am
> I misunderstanding how the architecture closest to your heart works?

Yuck....

> I guess you could work around that by checking mapcount+swapcount
> and granting write access in the common uniquely-mapped case; but
> swapoff has never bothered to do so.  Unless you can come up with
> convincing numbers, I'd say let it die - halve the time of a
> significant migration testcase?  yes, we should make a patch;
> shave 5% off it?  no, for peace of mind let's not worry about it.

Right. Thanks. At least I can now justify the vanishing of the 
dirty bit from the ptes.

Hmm.. Maybe ultimately we need to have a special mechanism (like Marcelo's 
migration cache) to remove ptes and add ptes during page migration. That 
could take this into account but it seems that such a mechanism better be
separate from the common swap code.

--
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 16:06 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
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 [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=Pine.LNX.4.64.0602280756130.18031@schroedinger.engr.sgi.com \
    --to=clameter@engr.sgi.com \
    --cc=akpm@osdl.org \
    --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