summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorSteven J. Magnani <steve@digidescorp.com>2010-11-24 12:56:54 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2010-12-09 13:27:02 -0800
commita9a275749034d3e23a7ed1ea8d784f1fe5a8d064 (patch)
treed61e3c051d6bc35520e4f59c25bc9e9c102216e9 /mm
parenta9386a4f6cf9c1b72862ac0aa4ffe02a22c1bd5b (diff)
downloadlwn-a9a275749034d3e23a7ed1ea8d784f1fe5a8d064.tar.gz
lwn-a9a275749034d3e23a7ed1ea8d784f1fe5a8d064.zip
nommu: yield CPU while disposing VM
commit 04c3496152394d17e3bc2316f9731ee3e8a026bc upstream. Depending on processor speed, page size, and the amount of memory a process is allowed to amass, cleanup of a large VM may freeze the system for many seconds. This can result in a watchdog timeout. Make sure other tasks receive some service when cleaning up large VMs. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Cc: Greg Ungerer <gerg@snapgear.com> Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'mm')
-rw-r--r--mm/nommu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/nommu.c b/mm/nommu.c
index ebb3154d84e4..406e8d47ce49 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -1615,6 +1615,7 @@ void exit_mmap(struct mm_struct *mm)
mm->mmap = vma->vm_next;
delete_vma_from_mm(vma);
delete_vma(mm, vma);
+ cond_resched();
}
kleave("");