From a53078ec5cc167413bad6dd7ce3c1fc8ec97d39e Mon Sep 17 00:00:00 2001 From: Namhoon Kim Date: Wed, 12 Oct 2016 19:13:30 -0400 Subject: RTAS 2017 Submission ver. --- mm/migrate.c | 12 ++++-------- mm/rmap.c | 4 +--- 2 files changed, 5 insertions(+), 11 deletions(-) (limited to 'mm') diff --git a/mm/migrate.c b/mm/migrate.c index a2e9cad083d5..8dd685be20d8 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -409,7 +409,7 @@ int replicate_page_move_mapping(struct address_space *mapping, void **pslot; BUG_ON(!mapping); - TRACE_TASK(current, "page has mapping.\n"); + spin_lock_irq(&mapping->tree_lock); pslot = radix_tree_lookup_slot(&mapping->page_tree, page_index(page)); @@ -933,7 +933,8 @@ static int copy_to_new_page(struct page *newpage, struct page *page, mapping = page_mapping(page); if (!mapping) { - rc = migrate_page(mapping, newpage, page, mode); + /* a shared library page must have a mapping. */ + BUG(); } else if (mapping->a_ops->migratepage) { rc = replicate_page(mapping, newpage, page, mode, has_replica); @@ -1296,10 +1297,7 @@ static ICE_noinline int unmap_and_copy(new_page_t get_new_page, } } rcu_read_unlock(); - - if (master_exist_in_psl) - TRACE_TASK(current, "Page %05lx exists in PSL list\n", lib_page->master_pfn); - + if (lib_page->r_page[cpu] == NULL) { newpage = get_new_page(page, private, &result); if (!newpage) @@ -1588,9 +1586,7 @@ int replicate_pages(struct list_head *from, new_page_t get_new_page, list_for_each_entry_safe(page, page2, from, lru) { cond_resched(); - TRACE_TASK(current, "PageAnon=%d\n", PageAnon(page)); rc = unmap_and_copy(get_new_page, put_new_page, private, page, pass > 2, mode); - TRACE_TASK(current, "rc = %d\n", rc); switch(rc) { case -ENOMEM: diff --git a/mm/rmap.c b/mm/rmap.c index 48c48c76b90f..06132109b9df 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -1423,8 +1423,7 @@ static int try_to_unmap_one_entry(struct page *page, struct vm_area_struct *vma, /* Establish migration entry for a file page */ swp_entry_t entry; entry = make_migration_entry(page, pte_write(pteval)); - set_pte_at(mm, address, pte, swp_entry_to_pte(entry)); -//printk(KERN_ERR "established migration entry for page %05lx PTE_WRITE = %d\n", page_to_pfn(page), pte_write(pteval)); + set_pte_at(mm, address, pte, swp_entry_to_pte(entry)); } else dec_mm_counter(mm, MM_FILEPAGES); @@ -1467,7 +1466,6 @@ int try_to_unmap_one_only(struct page *page, struct vm_area_struct *vma, { struct mm_struct *mm = vma->vm_mm; struct mm_struct *current_mm; - //int ret = SWAP_AGAIN; rcu_read_lock(); get_task_struct(current); -- cgit v1.2.2