The patch titled revert migrate_move_mapping to use direct radix tree slot update has been added to the -mm tree. Its filename is page-migration-replace-radix_tree_lookup_slot-with-radix_tree_lockup-update.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: revert migrate_move_mapping to use direct radix tree slot update From: Lee Schermerhorn <Lee.Schermerhorn@xxxxxx> been fixed, we can, if Christoph agrees: Revert migrate_page_move_mapping() to use direct radix tree slot replacement. Fix up variable types to match modified interfaces to radix_tree_{deref|replace}_slot(). Signed-off-by: Lee Schermerhorn <lee.schermerhorn@xxxxxx> Cc: Christoph Lameter <clameter@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- mm/migrate.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff -puN mm/migrate.c~page-migration-replace-radix_tree_lookup_slot-with-radix_tree_lockup-update mm/migrate.c --- a/mm/migrate.c~page-migration-replace-radix_tree_lookup_slot-with-radix_tree_lockup-update +++ a/mm/migrate.c @@ -294,8 +294,7 @@ out: static int migrate_page_move_mapping(struct address_space *mapping, struct page *newpage, struct page *page) { - struct page *current_page; - long index; + void **pslot; if (!mapping) { /* Anonymous page */ @@ -306,14 +305,11 @@ static int migrate_page_move_mapping(str write_lock_irq(&mapping->tree_lock); - index = page_index(page); - - current_page = (struct page *)radix_tree_lookup( - &mapping->page_tree, - index); + pslot = radix_tree_lookup_slot(&mapping->page_tree, + page_index(page)); if (page_count(page) != 2 + !!PagePrivate(page) || - current_page != page) { + (struct page *)radix_tree_deref_slot(pslot) != page) { write_unlock_irq(&mapping->tree_lock); return -EAGAIN; } @@ -321,7 +317,7 @@ static int migrate_page_move_mapping(str /* * Now we know that no one else is looking at the page. */ - get_page(newpage); + get_page(newpage); /* add cache reference */ #ifdef CONFIG_SWAP if (PageSwapCache(page)) { SetPageSwapCache(newpage); @@ -329,9 +325,14 @@ static int migrate_page_move_mapping(str } #endif - radix_tree_delete(&mapping->page_tree, index); - radix_tree_insert(&mapping->page_tree, index, newpage); + radix_tree_replace_slot(pslot, newpage); + + /* + * Drop cache reference from old page. + * We know this isn't the last reference. + */ __put_page(page); + write_unlock_irq(&mapping->tree_lock); return 0; _ Patches currently in -mm which might be from Lee.Schermerhorn@xxxxxx are adix-tree-rcu-lockless-readside-fix-3.patch radix-tree-cleanup-radix_tree_deref_slot-and.patch cleanup-radix_tree_derefreplace_slot-calling-conventions.patch page-migration-replace-radix_tree_lookup_slot-with-radix_tree_lockup-update.patch mempolicies-fix-policy_zone-check.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html