All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Rik van Riel <riel@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] RSS ulimit enforcement for 2.6.8
Date: Thu, 5 Aug 2004 15:31:16 -0700	[thread overview]
Message-ID: <20040805153116.3e820106.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0408051302330.8229-100000@dhcp83-102.boston.redhat.com>

Rik van Riel <riel@redhat.com> wrote:
>
> The patch below implements RSS ulimit enforcement for 2.6.8-rc3-mm1.
> It works in a very simple way: if a process has more resident memory
> than its RSS limit allows, we pretend it didn't access any of its
> pages, making it easy for the pageout code to evict the pages.
> 
> In addition to this, we don't allow a process that exceeds its RSS
> limit to have the swapout protection token.

Thanks.

I'd kinda expected that the patch would try to limit a process to its
RLIMIT_RSS all the time.  So if a process is set to 16MB and tries to use
32MB it gets to do a lot of swapping.  But you're not doing that.  Instead,
the patch is preferentially penalising processes which are over their limit
when we enter page reclaim.  What are the pros and cons, and what is the
thinking behind this?

Also, I wonder if it would be useful if refill_inactive_zone() were to
unconditionally move pages from over-rss-limit mm's onto the inactive list,
ignoring swappiness.  Or if we should explicitly deactivate pages which are
newly added to the LRU on behalf of an over-rss-limit process.



  parent reply	other threads:[~2004-08-05 22:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-05 17:05 [PATCH] RSS ulimit enforcement for 2.6.8 Rik van Riel
2004-08-05 20:34 ` Bill Davidsen
2004-08-05 20:49   ` Rik van Riel
2004-08-05 21:20     ` Andrew Morton
2004-08-10  7:28       ` Kurt Garloff
2004-08-08  3:09     ` Bill Davidsen
2004-08-05 22:31 ` Andrew Morton [this message]
2004-08-06  0:19   ` Rik van Riel
2004-08-06  0:36     ` Andrew Morton
2004-08-06  0:51       ` Rik van Riel
2004-08-06  0:53         ` Andrew Morton
2004-08-06  0:59           ` Rik van Riel
2004-08-06  2:22             ` Nick Piggin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040805153116.3e820106.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.