aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNamhoon Kim <namhoonk@cs.unc.edu>2016-09-30 03:43:08 -0400
committerNamhoon Kim <namhoonk@cs.unc.edu>2016-09-30 03:43:08 -0400
commit267b5fb8e3786eee621d434e4892020edd0fdf72 (patch)
treee0afe7a0e9e6e5cec4c4fce0b3ae6294368021a8
parent1735527cd6d215863dae7d4df8c7267d4337bb5d (diff)
Add Level C support
-rw-r--r--litmus/litmus.c8
-rw-r--r--mm/migrate.c4
-rw-r--r--mm/rmap.c2
3 files changed, 9 insertions, 5 deletions
diff --git a/litmus/litmus.c b/litmus/litmus.c
index 6088de312bb5..652e70df69bb 100644
--- a/litmus/litmus.c
+++ b/litmus/litmus.c
@@ -450,6 +450,7 @@ asmlinkage long sys_set_page_color(int cpu)
450 TRACE_TASK(current, "SHARED isolate_lru_page success\n"); 450 TRACE_TASK(current, "SHARED isolate_lru_page success\n");
451 } else { 451 } else {
452 TRACE_TASK(current, "SHARED isolate_lru_page failed\n"); 452 TRACE_TASK(current, "SHARED isolate_lru_page failed\n");
453 nr_failed++;
453 } 454 }
454 put_page(old_page); 455 put_page(old_page);
455 } 456 }
@@ -513,7 +514,10 @@ asmlinkage long sys_set_page_color(int cpu)
513 } 514 }
514*/ 515*/
515 if (!list_empty(&task_shared_pagelist)) { 516 if (!list_empty(&task_shared_pagelist)) {
516 ret = replicate_pages(&task_shared_pagelist, new_alloc_page, NULL, node, MIGRATE_SYNC, MR_SYSCALL); 517 if (node != 8)
518 ret = replicate_pages(&task_shared_pagelist, new_alloc_page, NULL, node, MIGRATE_SYNC, MR_SYSCALL);
519 else
520 ret = nr_shared_pages;
517 TRACE_TASK(current, "%ld shared pages not migrated.\n", ret); 521 TRACE_TASK(current, "%ld shared pages not migrated.\n", ret);
518 nr_not_migrated += ret; 522 nr_not_migrated += ret;
519 if (ret) { 523 if (ret) {
@@ -536,7 +540,7 @@ asmlinkage long sys_set_page_color(int cpu)
536 540
537 541
538 TRACE_TASK(current, "nr_pages = %d nr_failed = %d\n", nr_pages, nr_failed); 542 TRACE_TASK(current, "nr_pages = %d nr_failed = %d\n", nr_pages, nr_failed);
539 printk(KERN_INFO "node = %ld, nr_migrated_pages = %d, nr_shared_pages = %d, nr_failed = %d\n", node, nr_pages-nr_not_migrated, nr_shared_pages, nr_failed); 543 printk(KERN_INFO "node = %ld, nr_private_pages = %d, nr_shared_pages = %d, nr_failed_to_isolate_lru = %d, nr_not_migrated = %d\n", node, nr_pages, nr_shared_pages, nr_failed, nr_not_migrated);
540 544
541 flush_cache(1); 545 flush_cache(1);
542/* for debug START */ 546/* for debug START */
diff --git a/mm/migrate.c b/mm/migrate.c
index dbb46068a3f3..0df1841282eb 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1418,11 +1418,11 @@ static ICE_noinline int unmap_and_copy(new_page_t get_new_page,
1418 newpage = get_new_page(page, private, &result); 1418 newpage = get_new_page(page, private, &result);
1419 if (!newpage) 1419 if (!newpage)
1420 return -ENOMEM; 1420 return -ENOMEM;
1421 printk(KERN_ERR "Page %lx allocated\n", page_to_pfn(newpage)); 1421 //printk(KERN_ERR "Page %lx allocated\n", page_to_pfn(newpage));
1422 } else { 1422 } else {
1423 newpage = lib_page->r_page; 1423 newpage = lib_page->r_page;
1424 has_replica = 1; 1424 has_replica = 1;
1425 printk(KERN_ERR "Page %lx found\n", page_to_pfn(newpage)); 1425 //printk(KERN_ERR "Page %lx found\n", page_to_pfn(newpage));
1426 } 1426 }
1427 1427
1428 if (page_count(page) == 1) { 1428 if (page_count(page) == 1) {
diff --git a/mm/rmap.c b/mm/rmap.c
index 86678671506b..48c48c76b90f 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1424,7 +1424,7 @@ static int try_to_unmap_one_entry(struct page *page, struct vm_area_struct *vma,
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));
1427printk(KERN_ERR "established migration entry for page %05lx PTE_WRITE = %d\n", page_to_pfn(page), pte_write(pteval)); 1427//printk(KERN_ERR "established migration entry for page %05lx PTE_WRITE = %d\n", page_to_pfn(page), pte_write(pteval));
1428 } else 1428 } else
1429 dec_mm_counter(mm, MM_FILEPAGES); 1429 dec_mm_counter(mm, MM_FILEPAGES);
1430 1430