[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/5] mm improvements



On Wed, 4 Feb 2004, Nick Piggin wrote:

> > 1/5: vm-no-rss-limit.patch
> >     Remove broken RSS limiting. Simple problem, Rik is onto it.
> >

Does the patch below fix the performance problem with the
rss limit patch ?


===== fs/exec.c 1.103 vs edited =====
--- 1.103/fs/exec.c	Mon Jan 19 01:35:50 2004
+++ edited/fs/exec.c	Wed Feb  4 14:38:10 2004
@@ -1117,6 +1117,11 @@
 	retval = init_new_context(current, bprm.mm);
 	if (retval < 0)
 		goto out_mm;
+	if (likely(current->mm)) {
+		bprm.mm->rlimit_rss = current->mm->rlimit_rss;
+	} else {
+		bprm.mm->rlimit_rss = init_mm.rlimit_rss;
+	}
 
 	bprm.argc = count(argv, bprm.p / sizeof(void *));
 	if ((retval = bprm.argc) < 0)

--
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/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>