diff options
author | Thomas Hellström <thomas.hellstrom@linux.intel.com> | 2025-03-19 11:08:52 +0100 |
---|---|---|
committer | Thomas Hellström <thomas.hellstrom@linux.intel.com> | 2025-03-19 11:08:52 +0100 |
commit | 52eb8cd788f1a56a0645c1f6650e5795e04aaed0 (patch) | |
tree | 1d61fd7dbe5e7540e972069349b95ac65cd36880 /mm/hugetlb.c | |
parent | 28f79ac609de2797cccdd5fa6c4d5ec8bcef92b4 (diff) | |
parent | 5da39dce1fa3c81dc6552a16a9f748ba2980d630 (diff) |
Merge drm/drm-next into drm-xe-next
Backmerging to bring in the xe shrinker from drm-next.
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r-- | mm/hugetlb.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 163190e89ea16..97930d44d460e 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2943,6 +2943,14 @@ int replace_free_hugepage_folios(unsigned long start_pfn, unsigned long end_pfn) return ret; } +void wait_for_freed_hugetlb_folios(void) +{ + if (llist_empty(&hpage_freelist)) + return; + + flush_work(&free_hpage_work); +} + typedef enum { /* * For either 0/1: we checked the per-vma resv map, and one resv @@ -5447,7 +5455,7 @@ static void move_huge_pte(struct vm_area_struct *vma, unsigned long old_addr, if (src_ptl != dst_ptl) spin_lock_nested(src_ptl, SINGLE_DEPTH_NESTING); - pte = huge_ptep_get_and_clear(mm, old_addr, src_pte); + pte = huge_ptep_get_and_clear(mm, old_addr, src_pte, sz); if (need_clear_uffd_wp && pte_marker_uffd_wp(pte)) huge_pte_clear(mm, new_addr, dst_pte, sz); @@ -5622,7 +5630,7 @@ void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma, set_vma_resv_flags(vma, HPAGE_RESV_UNMAPPED); } - pte = huge_ptep_get_and_clear(mm, address, ptep); + pte = huge_ptep_get_and_clear(mm, address, ptep, sz); tlb_remove_huge_tlb_entry(h, tlb, ptep, address); if (huge_pte_dirty(pte)) set_page_dirty(page); |