linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Rik van Riel <H.H.vanRiel@phys.uu.nl>
To: "Eric W. Biederman" <ebiederm+eric@ccr.net>
Cc: Andrea Arcangeli <andrea@e-mind.com>,
	Linus Torvalds <torvalds@transmeta.com>,
	"Stephen C. Tweedie" <sct@redhat.com>,
	Linux MM <linux-mm@kvack.org>,
	Alan Cox <number6@the-village.bc.nu>
Subject: Re: New patch (was Re: [PATCH] swapin readahead v3 + kswapd fixes)
Date: Tue, 22 Dec 1998 21:03:17 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.03.9812222057210.397-100000@mirkwood.dummy.home> (raw)
In-Reply-To: <m1pv9cqjj4.fsf@flinx.ccr.net>

On 22 Dec 1998, Eric W. Biederman wrote:

> The goal is to keep one single rogue program from outcompeting all
> of the others. With implementing a RSS limit this is accomplished
> by at some point forcing free pages to come from the program that
> needs the memory, (via swap_out) instead of directly.
> 
> What currently happens is when such a program starts thrashing, is
> whenever it wakes up it steals all of the memory, and sleeps until
> it can steel some more.  Because the program is a better
> competitor, than the others.  With a RSS limit we would garantee
> that there is some memory left over for other programs to run in.
> 
> Eventually we should attempt to autotune a programs RSS by it's
> workload, and if giving a program a larger RSS doesn't help (that
> is the program continues to thrash with an RSS we give it) we
> should scale back it's RSS, so as not to compete with other
> programs.

I have a better idea:

if (current->mm->rss > hog_pct && total_mapped > syshog_pct) {
    ... swap_out_process(current, GFP)  swap_cluster pages ...
}

We can easily do something like this because swap_out() only
unmaps the pages and they can easily be mapped in again.

I know we tried it before and it horribly failed back then,
but now pages are not freed on swap_out(). Things have changed
in such a way that it could probably work now...

We want the above routine in one of the functions surrounding
mm/page_alloc.c::swap_in() -- this way we 'throttle at the
source'.

I know some of you think throttling at the source is a bad
thing (even for buffer cache), but you'll have to throttle
eventually and not doing it will mean you also 'throttle'
the (innocent) rest of the system...

cheers,

Rik -- the flu hits, the flu hits, the flu hits -- MORE
+-------------------------------------------------------------------+
| Linux memory management tour guide.        H.H.vanRiel@phys.uu.nl |
| Scouting Vries cubscout leader.      http://www.phys.uu.nl/~riel/ |
+-------------------------------------------------------------------+

--
This is a majordomo managed list.  To unsubscribe, send a message with
the body 'unsubscribe linux-mm me@address' to: majordomo@kvack.org

  parent reply	other threads:[~1998-12-22 21:51 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-01  6:55 [PATCH] swapin readahead v3 + kswapd fixes Rik van Riel
1998-12-01  8:15 ` Andrea Arcangeli
1998-12-01 15:28   ` Rik van Riel
1998-12-17  1:24 ` Linus Torvalds
1998-12-19 17:09   ` New patch (was Re: [PATCH] swapin readahead v3 + kswapd fixes) Stephen C. Tweedie
1998-12-19 18:41     ` Linus Torvalds
1998-12-19 19:41     ` Linus Torvalds
1998-12-19 22:01       ` Stephen C. Tweedie
1998-12-20  3:05         ` Linus Torvalds
1998-12-20 14:18         ` Linus Torvalds
1998-12-21 13:03           ` Andrea Arcangeli
1998-12-21 13:39           ` Stephen C. Tweedie
1998-12-21 14:08             ` Andrea Arcangeli
1998-12-21 16:42               ` Stephen C. Tweedie
1998-12-21  9:53     ` Andrea Arcangeli
1998-12-21 16:37       ` Stephen C. Tweedie
1998-12-21 17:58         ` Linus Torvalds
1998-12-21 18:59           ` Stephen C. Tweedie
1998-12-21 19:38             ` Linus Torvalds
1998-12-22  7:56           ` Eric W. Biederman
1998-12-22 10:49             ` Andrea Arcangeli
1998-12-22 15:32               ` Eric W. Biederman
1998-12-22 15:40                 ` Andrea Arcangeli
1998-12-22 16:26                   ` Linus Torvalds
1998-12-22 19:55                     ` Eric W. Biederman
1998-12-22 20:25                     ` Rik van Riel
1998-12-22 21:56                       ` Linus Torvalds
1998-12-22 20:10                   ` Rik van Riel
1998-12-22 22:35                     ` Andrea Arcangeli
1998-12-23  8:45                       ` Rik van Riel
1998-12-22 20:03                 ` Rik van Riel [this message]
1998-12-22 17:23               ` [patch] swap_out now really free (the right) pages [Re: New patch (was Re: [PATCH] swapin readahead v3 + kswapd fixes)] Andrea Arcangeli

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=Pine.LNX.4.03.9812222057210.397-100000@mirkwood.dummy.home \
    --to=h.h.vanriel@phys.uu.nl \
    --cc=andrea@e-mind.com \
    --cc=ebiederm+eric@ccr.net \
    --cc=linux-mm@kvack.org \
    --cc=number6@the-village.bc.nu \
    --cc=sct@redhat.com \
    --cc=torvalds@transmeta.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox