Skip to content

Commit

Permalink
mm/thp/migration: switch from flush_tlb_range to flush_pmd_tlb_range
Browse files Browse the repository at this point in the history
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
  • Loading branch information
kvaneesh committed Jan 6, 2016
1 parent 049d361 commit b8a7893
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions mm/migrate.c
Expand Up @@ -1764,7 +1764,7 @@ int migrate_misplaced_transhuge_page(struct mm_struct *mm,
}

if (mm_tlb_flush_pending(mm))
flush_tlb_range(vma, mmun_start, mmun_end);
flush_pmd_tlb_range(vma, mmun_start, mmun_end);

/* Prepare a page as a migration target */
__set_page_locked(new_page);
Expand Down Expand Up @@ -1818,12 +1818,16 @@ int migrate_misplaced_transhuge_page(struct mm_struct *mm,
page_add_anon_rmap(new_page, vma, mmun_start);
pmdp_huge_clear_flush_notify(vma, mmun_start, pmd);
set_pmd_at(mm, mmun_start, pmd, entry);
flush_tlb_range(vma, mmun_start, mmun_end);
/*
* Which mapping are we flushing here ? added by
* f714f4f20e59ea6eea264a86b9a51fd51b88fc54
* flush_tlb_range(vma, mmun_start, mmun_end);
*/
update_mmu_cache_pmd(vma, address, &entry);

if (page_count(page) != 2) {
set_pmd_at(mm, mmun_start, pmd, orig_entry);
flush_tlb_range(vma, mmun_start, mmun_end);
flush_pmd_tlb_range(vma, mmun_start, mmun_end);
mmu_notifier_invalidate_range(mm, mmun_start, mmun_end);
update_mmu_cache_pmd(vma, address, &entry);
page_remove_rmap(new_page);
Expand Down

0 comments on commit b8a7893

Please sign in to comment.