Re: 2.1.127 BUGS was Re: Linux-2.1.127

Stephen C. Tweedie (sct@redhat.com)
Wed, 11 Nov 1998 12:48:48 GMT


Hi,

On Tue, 10 Nov 1998 16:45:38 +0100, Andi Kleen <ak@muc.de> said:

> P.S.: while reading vmscan.c: would it make sense to add the following
> into the inner loop of swap_out (assuming maxover is 0 initially)?

> over = (p->rlim[RLIMIT_RSS].rlim_cur>>PAGE_SHIFT) - p->mm->rss;
> if (over < maxover) {
> pbest = p;
> maxover = over;
> continue;
> }

> With that RLIMIT_RSS would at least make some sense.

Sort of, but it's not quite what you want. RLIMIT_RSS should not remove
the process's pages completely: it should only remove them from the page
tables. The idea is that if you exceed your RSS limit, any excess pages
you use get relegated to the page cache, where they can be rapidly
reinstated if the process touches them again (it's just a minor page
fault with no disk IO required), but where we can easily remove the
pages for somebody else's use if we want.

--Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/