From: Christoph Lameter <clameter@sgi.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: npiggin@suse.de, linux-mm@kvack.org,
Lee Schermerhorn <lee.schermerhorn@hp.com>
Subject: Re: 2.6.18-rc3-mm2: rcu radix tree patches break page migration
Date: Mon, 7 Aug 2006 20:42:16 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0608072041010.24071@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <44D7E7DF.1080106@yahoo.com.au>
On Tue, 8 Aug 2006, Nick Piggin wrote:
> Question: can you replace the lookup_slot with a regular lookup, then
> replace the pointer switch with a radix_tree_delete + radix_tree_insert
> and see if that works?
Ahh... Okay that makes things work the right way.
Does that mean we need to get rid of radix tree replaces in
general?
Patch:
Index: linux-2.6.18-rc3-mm2/mm/migrate.c
===================================================================
--- linux-2.6.18-rc3-mm2.orig/mm/migrate.c 2006-08-07 20:21:12.985022791 -0700
+++ linux-2.6.18-rc3-mm2/mm/migrate.c 2006-08-07 20:25:28.676221751 -0700
@@ -294,7 +294,8 @@ out:
static int migrate_page_move_mapping(struct address_space *mapping,
struct page *newpage, struct page *page)
{
- struct page **radix_pointer;
+ struct page *radix_pointer;
+ long index;
if (!mapping) {
/* Anonymous page */
@@ -305,12 +306,14 @@ static int migrate_page_move_mapping(str
write_lock_irq(&mapping->tree_lock);
- radix_pointer = (struct page **)radix_tree_lookup_slot(
+ index = page_index(page);
+
+ radix_pointer = (struct page *)radix_tree_lookup(
&mapping->page_tree,
- page_index(page));
+ index);
if (page_count(page) != 2 + !!PagePrivate(page) ||
- radix_tree_deref_slot(radix_pointer) != page) {
+ radix_pointer != page) {
write_unlock_irq(&mapping->tree_lock);
return -EAGAIN;
}
@@ -326,7 +329,8 @@ static int migrate_page_move_mapping(str
}
#endif
- radix_tree_replace_slot(radix_pointer, newpage);
+ radix_tree_delete(&mapping->page_tree, index);
+ radix_tree_insert(&mapping->page_tree, index, newpage);
__put_page(page);
write_unlock_irq(&mapping->tree_lock);
--
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-08-08 3:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-07 23:10 Christoph Lameter
2006-08-08 1:24 ` Nick Piggin
2006-08-08 3:42 ` Christoph Lameter [this message]
2006-08-08 5:45 ` Nick Piggin
2006-08-08 14:53 ` Lee Schermerhorn
2006-08-08 16:19 ` Christoph Lameter
2006-08-08 17:25 ` Andrew Morton
2006-08-08 17:52 ` Christoph Lameter
2006-08-09 1:39 ` Nick Piggin
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.0608072041010.24071@schroedinger.engr.sgi.com \
--to=clameter@sgi.com \
--cc=lee.schermerhorn@hp.com \
--cc=linux-mm@kvack.org \
--cc=nickpiggin@yahoo.com.au \
--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