]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commitdiff
nommu: yield CPU while disposing VM
authorSteven J. Magnani <steve@digidescorp.com>
Wed, 24 Nov 2010 20:56:54 +0000 (12:56 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Dec 2010 21:33:17 +0000 (13:33 -0800)
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>
mm/nommu.c

index 88ff091eb07a23dcaee1e8e6d0cc70927183b89b..acb3bd3c1cb929c8ef7ea6c9bd013c0af45e5a6a 100644 (file)
@@ -1668,6 +1668,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("");