mm/thp/migration: switch from flush_tlb_range to flush_pmd_tlb_range
Subsystems (2)
PATCH 1/1 mm/thp/migration: switch from flush_tlb_range to flush_pmd_tlb_range
We remove one instace of flush_tlb_range here. That was added by f714f4f20e59ea6eea264a86b9a51fd51b88fc54 ("mm: numa: call MMU notifiers on THP migration"). But the pmdp_huge_clear_flush_notify should have done the require flush for us. Hence remove the extra flush.
--- mm/migrate.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
mm/migrate.c +5 -3
@@ -1767,7 +1767,10 @@ int migrate_misplaced_transhuge_page(struct mm_struct *mm,put_page (new_page); goto out_fail; } - +/* +* We are not sure a pending tlb flush here is for a huge page +* mapping or not. Hence use the tlb range variant +*/ if (mm_tlb_flush_pending (mm))flush_tlb_range (vma, mmun_start, mmun_end);
@@ -1823,12 +1826,11 @@ fail_putback:page_add_anon_rmap (new_page, vma, mmun_start, true);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);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, true);
Signature · 7 lines
2.5.0 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
kbuild test robot
build botreproduce:
Hi Aneesh,
[auto build test ERROR on v4.5-rc3]
[also build test ERROR on next-20160209]
[cannot apply to arc/for-next]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
url: https://github.com/0day-ci/linux/commits/Aneesh-Kumar-K-V/mm-thp-migration-switch-from-flush_tlb_range-to-flush_pmd_tlb_range/20160210-135701 config: x86_64-randconfig-x012-201606 (attached as .config) reproduce: # save the attached .config to linux build tree make ARCH=x86_64
All errors (new ones prefixed by >>):
mm/migrate.c: In function 'migrate_misplaced_transhuge_page':
>> mm/migrate.c:1833:3: error: implicit declaration of function 'flush_pmd_tlb_range' [-Werror=implicit-function-declaration]
flush_pmd_tlb_range(vma, mmun_start, mmun_end);
^cc1: some warnings being treated as errors
vim +/flush_pmd_tlb_range +1833 mm/migrate.c
1827 pmdp_huge_clear_flush_notify(vma, mmun_start, pmd);
1828 set_pmd_at(mm, mmun_start, pmd, entry);
1829 update_mmu_cache_pmd(vma, address, &entry);
1830
1831 if (page_count(page) != 2) {
1832 set_pmd_at(mm, mmun_start, pmd, orig_entry);
> 1833 flush_pmd_tlb_range(vma, mmun_start, mmun_end);
1834 mmu_notifier_invalidate_range(mm, mmun_start, mmun_end);
1835 update_mmu_cache_pmd(vma, address, &entry);
1836 page_remove_rmap(new_page, true);
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation