Skip to content

Commit

Permalink
nommu: yield CPU while disposing VM
Browse files Browse the repository at this point in the history
commit 04c3496 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>
Signed-off-by: Andi Kleen <ak@linux.intel.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>
  • Loading branch information
smagnani authored and Andi Kleen committed Dec 14, 2010
1 parent 7e8d53c commit a28c2bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mm/nommu.c
Expand Up @@ -1673,6 +1673,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("");
Expand Down

0 comments on commit a28c2bb

Please sign in to comment.