From: Hugh Dickins <hugh@veritas.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Nick Piggin <npiggin@suse.de>,
Linux Memory Management List <linux-mm@kvack.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [rfc][patch] mm: dirty page accounting race fix
Date: Thu, 14 Aug 2008 14:39:02 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0808141421550.14452@blonde.site> (raw)
In-Reply-To: <1218718149.10800.224.camel@twins>
On Thu, 14 Aug 2008, Peter Zijlstra wrote:
> On Thu, 2008-08-14 at 12:55 +0100, Hugh Dickins wrote:
>
> > But holding the page table lock on one pte of the
> > page doesn't guarantee much about the integrity of the whole dance:
> > do_wp_page does its set_page_dirty_balance for this case, you'd
> > need to spell out the bad sequence more to convince me.
>
> Now you're confusing me... are you saying ptes can be changed from under
> your feet even while holding the pte_lock?
Well, yes, dirty and accessed can be changed from another thread in
userspace while we hold pt lock in the kernel. (But dirty could only
be changed if the pte is writable, and in dirty balancing cases that
should be being prevented.)
But no, that isn't what I was thinking of. pt lock better be enough
to secure against kernel modifications to the pte. I was just thinking
there are (potentially) all those other ptes of the page, and this pte
may be modified the next instant, it wasn't obvious to me that missing
the one is so terrible.
Give me time, please don't let me confuse you, one of us is enough.
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:[~2008-08-14 13:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-14 9:45 Nick Piggin
2008-08-14 10:27 ` Peter Zijlstra
2008-08-14 11:55 ` Hugh Dickins
2008-08-14 12:18 ` Peter Zijlstra
2008-08-14 12:47 ` Hugh Dickins
2008-08-14 20:25 ` Jeremy Fitzhardinge
2008-08-14 12:35 ` Nick Piggin
2008-08-14 13:20 ` Hugh Dickins
2008-08-14 12:49 ` Peter Zijlstra
2008-08-14 13:39 ` Hugh Dickins [this message]
2008-08-14 13:52 ` Nick Piggin
2008-08-14 19:09 ` Hugh Dickins
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.0808141421550.14452@blonde.site \
--to=hugh@veritas.com \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=npiggin@suse.de \
/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