]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - mm/oom_kill.c
oom-reaper: use madvise_dontneed() logic to decide if unmap the VMA
[mirror_ubuntu-artful-kernel.git] / mm / oom_kill.c
index a1977247c7ea5276c82e7fcd7bc55f6e633cda78..8256788ac119679cb66d3b5b63c6797ba384d506 100644 (file)
@@ -508,14 +508,7 @@ static bool __oom_reap_task_mm(struct task_struct *tsk, struct mm_struct *mm)
 
        tlb_gather_mmu(&tlb, mm, 0, -1);
        for (vma = mm->mmap ; vma; vma = vma->vm_next) {
-               if (is_vm_hugetlb_page(vma))
-                       continue;
-
-               /*
-                * mlocked VMAs require explicit munlocking before unmap.
-                * Let's keep it simple here and skip such VMAs.
-                */
-               if (vma->vm_flags & VM_LOCKED)
+               if (!can_madv_dontneed_vma(vma))
                        continue;
 
                /*