Skip to content

Commit

Permalink
nommu: yield CPU while disposing VM
Browse files Browse the repository at this point in the history
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>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Steven J. Magnani authored and Linus Torvalds committed Nov 24, 2010
1 parent 3a3a1af commit 04c3496
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mm/nommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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("");
Expand Down

0 comments on commit 04c3496

Please sign in to comment.