diff options
author | Namhoon Kim <namhoonk@cs.unc.edu> | 2016-10-12 19:13:30 -0400 |
---|---|---|
committer | Namhoon Kim <namhoonk@cs.unc.edu> | 2016-10-12 19:13:30 -0400 |
commit | a53078ec5cc167413bad6dd7ce3c1fc8ec97d39e (patch) | |
tree | 00d403a486ddbdb6425fd5fe7141c98c08169417 /mm | |
parent | 2bed3116318647479e14aa22ff762bed16c066b4 (diff) |
RTAS 2017 Submission ver.wip-shared-lib2
Diffstat (limited to 'mm')
-rw-r--r-- | mm/migrate.c | 12 | ||||
-rw-r--r-- | mm/rmap.c | 4 |
2 files changed, 5 insertions, 11 deletions
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, | |||
409 | void **pslot; | 409 | void **pslot; |
410 | 410 | ||
411 | BUG_ON(!mapping); | 411 | BUG_ON(!mapping); |
412 | TRACE_TASK(current, "page has mapping.\n"); | 412 | |
413 | spin_lock_irq(&mapping->tree_lock); | 413 | spin_lock_irq(&mapping->tree_lock); |
414 | 414 | ||
415 | pslot = radix_tree_lookup_slot(&mapping->page_tree, page_index(page)); | 415 | 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, | |||
933 | 933 | ||
934 | mapping = page_mapping(page); | 934 | mapping = page_mapping(page); |
935 | if (!mapping) { | 935 | if (!mapping) { |
936 | rc = migrate_page(mapping, newpage, page, mode); | 936 | /* a shared library page must have a mapping. */ |
937 | BUG(); | ||
937 | } | 938 | } |
938 | else if (mapping->a_ops->migratepage) { | 939 | else if (mapping->a_ops->migratepage) { |
939 | rc = replicate_page(mapping, newpage, page, mode, has_replica); | 940 | 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, | |||
1296 | } | 1297 | } |
1297 | } | 1298 | } |
1298 | rcu_read_unlock(); | 1299 | rcu_read_unlock(); |
1299 | 1300 | ||
1300 | if (master_exist_in_psl) | ||
1301 | TRACE_TASK(current, "Page %05lx exists in PSL list\n", lib_page->master_pfn); | ||
1302 | |||
1303 | if (lib_page->r_page[cpu] == NULL) { | 1301 | if (lib_page->r_page[cpu] == NULL) { |
1304 | newpage = get_new_page(page, private, &result); | 1302 | newpage = get_new_page(page, private, &result); |
1305 | if (!newpage) | 1303 | if (!newpage) |
@@ -1588,9 +1586,7 @@ int replicate_pages(struct list_head *from, new_page_t get_new_page, | |||
1588 | list_for_each_entry_safe(page, page2, from, lru) { | 1586 | list_for_each_entry_safe(page, page2, from, lru) { |
1589 | cond_resched(); | 1587 | cond_resched(); |
1590 | 1588 | ||
1591 | TRACE_TASK(current, "PageAnon=%d\n", PageAnon(page)); | ||
1592 | rc = unmap_and_copy(get_new_page, put_new_page, private, page, pass > 2, mode); | 1589 | rc = unmap_and_copy(get_new_page, put_new_page, private, page, pass > 2, mode); |
1593 | TRACE_TASK(current, "rc = %d\n", rc); | ||
1594 | 1590 | ||
1595 | switch(rc) { | 1591 | switch(rc) { |
1596 | case -ENOMEM: | 1592 | case -ENOMEM: |
@@ -1423,8 +1423,7 @@ static int try_to_unmap_one_entry(struct page *page, struct vm_area_struct *vma, | |||
1423 | /* Establish migration entry for a file page */ | 1423 | /* Establish migration entry for a file page */ |
1424 | swp_entry_t entry; | 1424 | swp_entry_t entry; |
1425 | entry = make_migration_entry(page, pte_write(pteval)); | 1425 | entry = make_migration_entry(page, pte_write(pteval)); |
1426 | set_pte_at(mm, address, pte, swp_entry_to_pte(entry)); | 1426 | set_pte_at(mm, address, pte, swp_entry_to_pte(entry)); |
1427 | //printk(KERN_ERR "established migration entry for page %05lx PTE_WRITE = %d\n", page_to_pfn(page), pte_write(pteval)); | ||
1428 | } else | 1427 | } else |
1429 | dec_mm_counter(mm, MM_FILEPAGES); | 1428 | dec_mm_counter(mm, MM_FILEPAGES); |
1430 | 1429 | ||
@@ -1467,7 +1466,6 @@ int try_to_unmap_one_only(struct page *page, struct vm_area_struct *vma, | |||
1467 | { | 1466 | { |
1468 | struct mm_struct *mm = vma->vm_mm; | 1467 | struct mm_struct *mm = vma->vm_mm; |
1469 | struct mm_struct *current_mm; | 1468 | struct mm_struct *current_mm; |
1470 | //int ret = SWAP_AGAIN; | ||
1471 | 1469 | ||
1472 | rcu_read_lock(); | 1470 | rcu_read_lock(); |
1473 | get_task_struct(current); | 1471 | get_task_struct(current); |