aboutsummaryrefslogtreecommitdiffstats
path: root/mm/migrate.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/migrate.c')
-rw-r--r--mm/migrate.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index 0df1841282eb..d25cc2c2736d 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1398,29 +1398,29 @@ static ICE_noinline int unmap_and_copy(new_page_t get_new_page,
1398 int *result = NULL; 1398 int *result = NULL;
1399 struct page *newpage; 1399 struct page *newpage;
1400 struct shared_lib_page *lib_page; 1400 struct shared_lib_page *lib_page;
1401 int is_exist_in_psl = 0, has_replica = 0; 1401 int master_exist_in_psl = 0, has_replica = 0, cpu = private/2;
1402 1402
1403 /* check if this page is in the PSL list */ 1403 /* check if this page is in the PSL list */
1404 rcu_read_lock(); 1404 rcu_read_lock();
1405 list_for_each_entry(lib_page, &shared_lib_pages, list) 1405 list_for_each_entry(lib_page, &shared_lib_pages, list)
1406 { 1406 {
1407 if (page_to_pfn(page) == lib_page->master_pfn) { 1407 if (page_to_pfn(page) == lib_page->master_pfn) {
1408 is_exist_in_psl = 1; 1408 master_exist_in_psl = 1;
1409 break; 1409 break;
1410 } 1410 }
1411 } 1411 }
1412 rcu_read_unlock(); 1412 rcu_read_unlock();
1413 1413
1414 if (is_exist_in_psl) 1414 if (master_exist_in_psl)
1415 TRACE_TASK(current, "Page %x exists in PSL list\n", lib_page->master_pfn); 1415 TRACE_TASK(current, "Page %05lx exists in PSL list\n", lib_page->master_pfn);
1416 1416
1417 if (lib_page->r_page == NULL) { 1417 if (lib_page->r_page[cpu] == NULL) {
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[cpu];
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 }
@@ -1438,8 +1438,8 @@ static ICE_noinline int unmap_and_copy(new_page_t get_new_page,
1438 rc = __unmap_and_copy(page, newpage, force, mode, has_replica); 1438 rc = __unmap_and_copy(page, newpage, force, mode, has_replica);
1439 1439
1440 if (has_replica == 0 && rc == MIGRATEPAGE_SUCCESS) { 1440 if (has_replica == 0 && rc == MIGRATEPAGE_SUCCESS) {
1441 lib_page->r_page = newpage; 1441 lib_page->r_page[cpu] = newpage;
1442 lib_page->r_pfn = page_to_pfn(newpage); 1442 lib_page->r_pfn[cpu] = page_to_pfn(newpage);
1443 } 1443 }
1444 1444
1445out: 1445out: