[nacked] mm-oom-remove-oom_lock-from-exit_mmap.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm, oom: remove oom_lock from exit_mmap()
has been removed from the -mm tree.  Its filename was
     mm-oom-remove-oom_lock-from-exit_mmap.patch

This patch was dropped because it was nacked

------------------------------------------------------
From: David Rientjes <rientjes@xxxxxxxxxx>
Subject: mm, oom: remove oom_lock from exit_mmap()

oom_lock isn't needed for __oom_reap_task_mm().  If MMF_UNSTABLE is
already set for the mm, we can simply back out immediately since oom
reaping is already in progress (or done).

Link: http://lkml.kernel.org/r/alpine.DEB.2.21.1807121432370.170100@xxxxxxxxxxxxxxxxxxxxxxxxx
Signed-off-by: David Rientjes <rientjes@xxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxxxx>
Cc: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---


diff -puN mm/mmap.c~mm-oom-remove-oom_lock-from-exit_mmap mm/mmap.c
--- a/mm/mmap.c~mm-oom-remove-oom_lock-from-exit_mmap
+++ a/mm/mmap.c
@@ -3070,9 +3070,7 @@ void exit_mmap(struct mm_struct *mm)
 		 * to mmu_notifier_release(mm) ensures mmu notifier callbacks in
 		 * __oom_reap_task_mm() will not block.
 		 */
-		mutex_lock(&oom_lock);
 		__oom_reap_task_mm(mm);
-		mutex_unlock(&oom_lock);
 
 		/*
 		 * Now, set MMF_UNSTABLE to avoid racing with the oom reaper.
diff -puN mm/oom_kill.c~mm-oom-remove-oom_lock-from-exit_mmap mm/oom_kill.c
--- a/mm/oom_kill.c~mm-oom-remove-oom_lock-from-exit_mmap
+++ a/mm/oom_kill.c
@@ -496,9 +496,11 @@ void __oom_reap_task_mm(struct mm_struct
 	 * Tell all users of get_user/copy_from_user etc... that the content
 	 * is no longer stable. No barriers really needed because unmapping
 	 * should imply barriers already and the reader would hit a page fault
-	 * if it stumbled over a reaped memory.
+	 * if it stumbled over a reaped memory. If MMF_UNSTABLE is already set,
+	 * reaping as already occurred so nothing left to do.
 	 */
-	set_bit(MMF_UNSTABLE, &mm->flags);
+	if (test_and_set_bit(MMF_UNSTABLE, &mm->flags))
+		return;
 
 	for (vma = mm->mmap ; vma; vma = vma->vm_next) {
 		if (!can_madv_dontneed_vma(vma))
_

Patches currently in -mm which might be from rientjes@xxxxxxxxxx are

mm-vmacache-hash-addresses-based-on-pmd.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux