+ read-write-migration-entries-implement-correct-behavior-in-copy_one_pte.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     Read/Write migration entries: Implement correct behavior in copy_one_pte

has been added to the -mm tree.  Its filename is

     read-write-migration-entries-implement-correct-behavior-in-copy_one_pte.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>

Migration entries with write permission must become SWP_MIGRATION_READ
entries if a COW mapping is processed.  The migration entries from which
the copy is being made must also become SWP_MIGRATION_READ.  This mimicks
the copying of pte for an anonymous page.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
Signed-off-by: Christoph Lameter <clameter@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 mm/memory.c |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletion(-)

diff -puN mm/memory.c~read-write-migration-entries-implement-correct-behavior-in-copy_one_pte mm/memory.c
--- devel/mm/memory.c~read-write-migration-entries-implement-correct-behavior-in-copy_one_pte	2006-04-18 23:14:18.000000000 -0700
+++ devel-akpm/mm/memory.c	2006-04-18 23:14:18.000000000 -0700
@@ -434,7 +434,9 @@ copy_one_pte(struct mm_struct *dst_mm, s
 	/* pte contains position in swap or file, so copy. */
 	if (unlikely(!pte_present(pte))) {
 		if (!pte_file(pte)) {
-			swap_duplicate(pte_to_swp_entry(pte));
+			swp_entry_t entry = pte_to_swp_entry(pte);
+
+			swap_duplicate(entry);
 			/* make sure dst_mm is on swapoff's mmlist. */
 			if (unlikely(list_empty(&dst_mm->mmlist))) {
 				spin_lock(&mmlist_lock);
@@ -443,6 +445,19 @@ copy_one_pte(struct mm_struct *dst_mm, s
 						 &src_mm->mmlist);
 				spin_unlock(&mmlist_lock);
 			}
+			if (is_migration_entry(entry) &&
+					is_cow_mapping(vm_flags)) {
+				page = migration_entry_to_page(entry);
+
+				/*
+				 * COW mappings require pages in both parent
+				*  and child to be set to read.
+				 */
+				entry = make_migration_entry(page,
+	`					SWP_MIGRATION_READ);
+				pte = swp_entry_to_pte(entry);
+				set_pte_at(src_mm, addr, src_pte, pte);
+			}
 		}
 		goto out_set_pte;
 	}
_

Patches currently in -mm which might be from clameter@xxxxxxx are

remove-cond_resched-in-gather_stats.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
preserve-write-permissions-in-migration-entries-fix.patch
migration_entry_wait-use-the-pte-lock-instead-of-the-anon_vma-lock.patch
read-write-migration-entries-implement-correct-behavior-in-copy_one_pte.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

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux