The patch titled Wait for migrating page after incr of page count under anon_vma lock has been added to the -mm tree. Its filename is wait-for-migrating-page-after-incr-of-page-count-under-anon_vma-lock.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this From: Christoph Lameter <clameter@xxxxxxx> Wait for migrating page after incr of page count under anon_vma lock This patch replaces the yield() in do_swap_page with a call to migration_entry_wait() in the migration code. migration_entry_wait() locks the anonymous vma of the page and then safely increments page count before waiting for the page to become unlocked. Migration entries are only removed while holding the anon_vma lock (See remove_migration_ptes). Therefore we can be sure that the migration pte is not modified and the underlying page is not removed while holding this lock. Also make is_migration_entry() unlikely and clean up a unnecessary BUG_ON. Signed-off-by: Christoph Lameter <clameter@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- include/linux/swapops.h | 6 ++++-- mm/memory.c | 4 ++-- migrate.c | 0 3 files changed, 6 insertions(+), 4 deletions(-) diff -puN include/linux/swapops.h~wait-for-migrating-page-after-incr-of-page-count-under-anon_vma-lock include/linux/swapops.h --- devel/include/linux/swapops.h~wait-for-migrating-page-after-incr-of-page-count-under-anon_vma-lock 2006-04-14 22:09:01.000000000 -0700 +++ devel-akpm/include/linux/swapops.h 2006-04-14 22:09:01.000000000 -0700 @@ -77,7 +77,7 @@ static inline swp_entry_t make_migration static inline int is_migration_entry(swp_entry_t entry) { - return swp_type(entry) == SWP_TYPE_MIGRATION; + return unlikely(swp_type(entry) == SWP_TYPE_MIGRATION); } static inline struct page *migration_entry_to_page(swp_entry_t entry) @@ -88,14 +88,16 @@ static inline struct page *migration_ent * corresponding page is locked */ BUG_ON(!PageLocked(p)); - BUG_ON(!is_migration_entry(entry)); return p; } + +extern void migration_entry_wait(swp_entry_t, pte_t *); #else #define make_migration_entry(page) swp_entry(0, 0) #define is_migration_entry(swp) 0 #define migration_entry_to_page(swp) NULL +static inline void migration_entry_wait(swp_entry_t entry, pte_t *ptep) { } #endif diff -puN mm/memory.c~wait-for-migrating-page-after-incr-of-page-count-under-anon_vma-lock mm/memory.c --- devel/mm/memory.c~wait-for-migrating-page-after-incr-of-page-count-under-anon_vma-lock 2006-04-14 22:09:01.000000000 -0700 +++ devel-akpm/mm/memory.c 2006-04-14 22:09:01.000000000 -0700 @@ -1880,8 +1880,8 @@ static int do_swap_page(struct mm_struct entry = pte_to_swp_entry(orig_pte); - if (unlikely(is_migration_entry(entry))) { - yield(); + if (is_migration_entry(entry)) { + migration_entry_wait(entry, page_table); goto out; } diff -puN mm/migrate.c~wait-for-migrating-page-after-incr-of-page-count-under-anon_vma-lock mm/migrate.c _ Patches currently in -mm which might be from clameter@xxxxxxx are origin.patch page-migration-make-do_swap_page-redo-the-fault.patch slab-extract-cache_free_alien-from-__cache_free.patch migration-remove-unnecessary-pageswapcache-checks.patch migration-remove-unnecessary-pageswapcache-checks-fix.patch swapless-v2-try_to_unmap-rename-ignrefs-to-migration.patch swapless-v2-add-migration-swap-entries.patch swapless-v2-make-try_to_unmap-create-migration-entries.patch swapless-v2-rip-out-swap-portion-of-old-migration-code.patch swapless-v2-revise-main-migration-logic.patch wait-for-migrating-page-after-incr-of-page-count-under-anon_vma-lock.patch preserve-write-permissions-in-migration-entries.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