Re: [PATCH 1/5] mm improvements

Rik van Riel
2004-02-04T19:45:21Z

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)