khugepaged.c (5ab0fc155dc0cac3b74584f7bc972569b0f8a57b) | khugepaged.c (7d4a8be0c4b2b7ffb367929d2b352651f083806b) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 3 4#include <linux/mm.h> 5#include <linux/sched.h> 6#include <linux/sched/mm.h> 7#include <linux/sched/coredump.h> 8#include <linux/mmu_notifier.h> --- 1026 unchanged lines hidden (view full) --- 1035 goto out_up_write; 1036 /* check if the pmd is still valid */ 1037 result = check_pmd_still_valid(mm, address, pmd); 1038 if (result != SCAN_SUCCEED) 1039 goto out_up_write; 1040 1041 anon_vma_lock_write(vma->anon_vma); 1042 | 1// SPDX-License-Identifier: GPL-2.0 2#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 3 4#include <linux/mm.h> 5#include <linux/sched.h> 6#include <linux/sched/mm.h> 7#include <linux/sched/coredump.h> 8#include <linux/mmu_notifier.h> --- 1026 unchanged lines hidden (view full) --- 1035 goto out_up_write; 1036 /* check if the pmd is still valid */ 1037 result = check_pmd_still_valid(mm, address, pmd); 1038 if (result != SCAN_SUCCEED) 1039 goto out_up_write; 1040 1041 anon_vma_lock_write(vma->anon_vma); 1042 |
1043 mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, NULL, mm, 1044 address, address + HPAGE_PMD_SIZE); | 1043 mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, mm, address, 1044 address + HPAGE_PMD_SIZE); |
1045 mmu_notifier_invalidate_range_start(&range); 1046 1047 pte = pte_offset_map(pmd, address); 1048 pte_ptl = pte_lockptr(mm, pmd); 1049 1050 pmd_ptl = pmd_lock(mm, pmd); /* probably unnecessary */ 1051 /* 1052 * This removes any huge TLB entry from the CPU so we won't allow --- 354 unchanged lines hidden (view full) --- 1407 lockdep_assert_held_write(&vma->vm_file->f_mapping->i_mmap_rwsem); 1408 /* 1409 * All anon_vmas attached to the VMA have the same root and are 1410 * therefore locked by the same lock. 1411 */ 1412 if (vma->anon_vma) 1413 lockdep_assert_held_write(&vma->anon_vma->root->rwsem); 1414 | 1045 mmu_notifier_invalidate_range_start(&range); 1046 1047 pte = pte_offset_map(pmd, address); 1048 pte_ptl = pte_lockptr(mm, pmd); 1049 1050 pmd_ptl = pmd_lock(mm, pmd); /* probably unnecessary */ 1051 /* 1052 * This removes any huge TLB entry from the CPU so we won't allow --- 354 unchanged lines hidden (view full) --- 1407 lockdep_assert_held_write(&vma->vm_file->f_mapping->i_mmap_rwsem); 1408 /* 1409 * All anon_vmas attached to the VMA have the same root and are 1410 * therefore locked by the same lock. 1411 */ 1412 if (vma->anon_vma) 1413 lockdep_assert_held_write(&vma->anon_vma->root->rwsem); 1414 |
1415 mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, NULL, mm, addr, | 1415 mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, mm, addr, |
1416 addr + HPAGE_PMD_SIZE); 1417 mmu_notifier_invalidate_range_start(&range); 1418 pmd = pmdp_collapse_flush(vma, addr, pmdp); 1419 tlb_remove_table_sync_one(); 1420 mmu_notifier_invalidate_range_end(&range); 1421 mm_dec_nr_ptes(mm); 1422 page_table_check_pte_clear_range(mm, addr, pmd); 1423 pte_free(mm, pmd_pgtable(pmd)); --- 1313 unchanged lines hidden --- | 1416 addr + HPAGE_PMD_SIZE); 1417 mmu_notifier_invalidate_range_start(&range); 1418 pmd = pmdp_collapse_flush(vma, addr, pmdp); 1419 tlb_remove_table_sync_one(); 1420 mmu_notifier_invalidate_range_end(&range); 1421 mm_dec_nr_ptes(mm); 1422 page_table_check_pte_clear_range(mm, addr, pmd); 1423 pte_free(mm, pmd_pgtable(pmd)); --- 1313 unchanged lines hidden --- |