From: Hugh Dickins <hugh@veritas.com>
To: Christoph Lameter <clameter@engr.sgi.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 14:05:40 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.61.0602281346060.7504@goblin.wat.veritas.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0602272117180.15738@schroedinger.engr.sgi.com>
On Mon, 27 Feb 2006, Christoph Lameter wrote:
>
> unuse_pte is used:
>
> 1. To switch off a swap device.
>
> 2. To reestablish ptes for a migrated anonymous page.
>
> In both cases we are only dealing with anonymous pages. The only writer
> can be the swap code and as far as I can tell the only risk is writing a
> swap page out once again. That is if it would be cleaned by pageout().
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 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?
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.
Hugh
--
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>
next prev parent reply other threads:[~2006-02-28 14:05 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 [this message]
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=Pine.LNX.4.61.0602281346060.7504@goblin.wat.veritas.com \
--to=hugh@veritas.com \
--cc=akpm@osdl.org \
--cc=clameter@engr.sgi.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