linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][V2] nommu: yield CPU while disposing VM
@ 2010-11-16 13:06 Steven J. Magnani
  2010-11-23  7:16 ` KOSAKI Motohiro
  0 siblings, 1 reply; 2+ messages in thread
From: Steven J. Magnani @ 2010-11-16 13:06 UTC (permalink / raw)
  To: linux-mm
  Cc: stable, linux-kernel, gerg, kosaki.motohiro, akpm,
	Steven J. Magnani

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>
---
diff -uprN a/mm/nommu.c b/mm/nommu.c
--- a/mm/nommu.c	2010-11-15 07:53:45.000000000 -0600
+++ b/mm/nommu.c	2010-11-15 07:57:13.000000000 -0600
@@ -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("");

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH][V2] nommu: yield CPU while disposing VM
  2010-11-16 13:06 [PATCH][V2] nommu: yield CPU while disposing VM Steven J. Magnani
@ 2010-11-23  7:16 ` KOSAKI Motohiro
  0 siblings, 0 replies; 2+ messages in thread
From: KOSAKI Motohiro @ 2010-11-23  7:16 UTC (permalink / raw)
  To: Steven J. Magnani
  Cc: kosaki.motohiro, linux-mm, stable, linux-kernel, gerg, akpm

> 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>
> ---
> diff -uprN a/mm/nommu.c b/mm/nommu.c
> --- a/mm/nommu.c	2010-11-15 07:53:45.000000000 -0600
> +++ b/mm/nommu.c	2010-11-15 07:57:13.000000000 -0600
> @@ -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("");
> 

Looks good to me.
	Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-23  7:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-16 13:06 [PATCH][V2] nommu: yield CPU while disposing VM Steven J. Magnani
2010-11-23  7:16 ` KOSAKI Motohiro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).