From: Hugh Dickins <hugh@veritas.com>
To: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, kernel-testers@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: 2.6.26-rc5-mm2
Date: Tue, 10 Jun 2008 17:50:14 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0806101723070.23096@blonde.site> (raw)
In-Reply-To: <1213112065.6872.12.camel@lts-notebook>
On Tue, 10 Jun 2008, Lee Schermerhorn wrote:
> On Tue, 2008-06-10 at 17:28 +1000, Nick Piggin wrote:
> > mm/memory.c:do_wp_page
> > //TODO: is this safe? do_anonymous_page() does it this way.
> >
> > That's a bit disheartening. Surely a question like that has to
> > be answered definitively? (hopefully whatever is doing the
> > asking won't get merged until answered)
>
> I put those C++ TODO comments in there specifically to raise their
> visibility in hopes that someone [like you :)] would notice and maybe
> have an answer to the question. I noted the issue in the change log as
> well--i.e., that I had moved set_pte_at() to after the lru_cache_add and
> 'new_rmap. The existing order may be that way for a reason, but it's
> not clear [to me] what that reason is. As I noted, do_anonymous_page()
> sets the pte after the lru_add and new_rmap.
>
> I agree, these questions need to be answered and the TODO's resolved
> before merging. Any thoughts as to the ordering?
The ordering of lru_cache_add*, page_add_*_rmap and set_pte_at does
not matter (but update_mmu_cache must come after set_pte_at not before).
Even if the page table lock were not held across them (it is), I think
their ordering would not matter much (just benign races); though it's
always worth keeping in mind that once you've done the lru_cache_add,
that page is now visible to vmscan.c.
But I'm all in favour of you imposing consistency there (as part of
a wider patch? perhaps not; and do_swap_page does now look out of step).
It can sometimes help when inserting debug checks e.g. on page_mapcount.
I think you'll find the lru_cache_add_active_or_noreclaim could
actually be moved into page_add_new_rmap - I found that helpful when
working on eliminating the PageSwapCache flag (work now grown out of
date, I'm afraid), to know that the page was not publicly visible
until I did lru_cache_add_active at the end of page_add_new_rmap.
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-06-10 16:50 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-10 5:31 2.6.26-rc5-mm2 Andrew Morton
2008-06-10 6:12 ` 2.6.26-rc5-mm2 Nick Piggin
2008-06-10 7:28 ` 2.6.26-rc5-mm2 Nick Piggin
2008-06-10 8:34 ` 2.6.26-rc5-mm2 Andrew Morton
2008-06-10 8:48 ` 2.6.26-rc5-mm2 Nick Piggin
2008-06-10 9:15 ` 2.6.26-rc5-mm2 Andrew Morton
2008-06-10 12:34 ` 2.6.26-rc5-mm2 Rik van Riel
2008-06-11 18:09 ` 2.6.26-rc5-mm2 Rik van Riel
2008-06-11 23:58 ` 2.6.26-rc5-mm2 Nick Piggin
2008-06-12 19:29 ` 2.6.26-rc5-mm2 Rik van Riel
2008-06-12 21:15 ` 2.6.26-rc5-mm2 (swap_state.c:77) Hugh Dickins
2008-06-13 17:45 ` Rik van Riel
2008-06-13 21:15 ` Hugh Dickins
2008-06-13 22:03 ` Rik van Riel
2008-06-10 15:34 ` 2.6.26-rc5-mm2 Lee Schermerhorn
2008-06-10 16:50 ` Hugh Dickins [this message]
2008-06-10 10:20 ` 2.6.26-rc5-mm2 lockup up on Intel G33+ICH9R+Core2Duo, -mm1 okay Grant Coady
2008-06-10 18:18 ` Andrew Morton
2008-06-10 21:48 ` Grant Coady
2008-06-10 11:50 ` 2.6.26-rc5-mm2 compile error in vmscan.c Helge Hafting
2008-06-10 12:23 ` Johannes Weiner
2008-06-10 18:37 ` Andrew Morton
2008-06-12 8:13 ` Helge Hafting
2008-06-11 2:26 ` 2.6.26-rc5-mm2 (compile error in mm/memory_hotplug.c) Yasunori Goto
2008-06-11 6:00 ` 2.6.26-rc5-mm2: OOM with 1G free swap Alexey Dobriyan
2008-06-11 6:11 ` Nick Piggin
2008-06-11 6:15 ` Nick Piggin
2008-06-11 6:27 ` Andrew Morton
2008-06-11 6:31 ` Nick Piggin
2008-06-11 6:36 ` KOSAKI Motohiro
2008-06-11 7:31 ` Frederik Deweerdt
2008-06-11 12:57 ` Rik van Riel
2008-06-11 13:44 ` Nick Piggin
2008-06-11 17:56 ` [BUG] 2.6.26-rc5-mm2 - kernel BUG at arch/x86/kernel/setup.c:388! Kamalesh Babulal
2008-06-11 18:28 ` Dave Hansen
2008-06-11 18:37 ` Vegard Nossum
2008-06-12 6:55 ` Kamalesh Babulal
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.0806101723070.23096@blonde.site \
--to=hugh@veritas.com \
--cc=Lee.Schermerhorn@hp.com \
--cc=akpm@linux-foundation.org \
--cc=kernel-testers@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nickpiggin@yahoo.com.au \
/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