Re: [PATCH v1 2/3] mm: process_mrelease: skip LRU movement for exclusive file folios

David Hildenbrand (Arm)
2026-04-29T08:55:29Z

>
> -static bool __oom_reap_task_mm(struct mm_struct *mm)
> +static bool __oom_reap_task_mm(struct mm_struct *mm, bool try_evict_file_folios)
> {
> struct vm_area_struct *vma;
> bool ret = true;
> @@ -556,12 +556,14 @@ static bool __oom_reap_task_mm(struct mm_struct *mm)
> mm, vma->vm_start,
> vma->vm_end);
> tlb_gather_mmu(&tlb, mm);
> + tlb.try_evict_file_folios = try_evict_file_folios;
> + struct zap_details details = { .ignore_access = try_evict_file_folios };
> if (mmu_notifier_invalidate_range_start_nonblock(&range)) {
> tlb_finish_mmu(&tlb);
> ret = false;
> continue;
> }
> - unmap_page_range(&tlb, vma, range.start, range.end, NULL);
> + unmap_page_range(&tlb, vma, range.start, range.end, &details);
> mmu_notifier_invalidate_range_end(&range);

This API was changed in the meantime into zap_vma_for_reaping(), and I do not
want to pass details on the new interface. If so, zap_vma_for_reaping() would
handle that internally I guess.

--
Cheers,

David