From: Steven J. Magnani Date: Wed, 24 Nov 2010 20:56:54 +0000 (-0800) Subject: nommu: yield CPU while disposing VM X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=04c3496152394d17e3bc2316f9731ee3e8a026bc;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git nommu: yield CPU while disposing VM 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 Cc: Greg Ungerer Reviewed-by: KOSAKI Motohiro Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/nommu.c b/mm/nommu.c index 3613517c7592..27a9ac588516 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -1717,6 +1717,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("");