From: Rik van Riel <riel@conectiva.com.br>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Andrea Arcangeli <andrea@suse.de>, linux-mm@kvack.org
Subject: Re: 2.3.x mem balancing
Date: Tue, 25 Apr 2000 14:50:12 -0300 (BRST) [thread overview]
Message-ID: <Pine.LNX.4.21.0004251437540.10408-100000@duckman.conectiva> (raw)
In-Reply-To: <Pine.LNX.4.10.10004250932570.750-100000@penguin.transmeta.com>
On Tue, 25 Apr 2000, Linus Torvalds wrote:
> Andrea, how do you ever propose to handle the case of four
> different memory zones, all "equal", but all separate in that
> while all of memory isaccessible from each CPU, each zone is
> "closer" to certain CPU's? Let's say that CPU's 0-3 have direct
> access to zone 0, CPU's 4-7 have direct access to zone 1, etc
> etc.. Whenever a CPU touches memory on a non-local zone, it
> takes longer for the cache miss, but it still works.
[snip different zonelists for each node at allocation time]
There's only one small addition that I'd like to see. Memory
should be reclaimed on a more or less _global_ level because
the processes in node 0 could use much less memory than the
processes in node 1.
Doing strict per-zone memory balancing in this case means that
node 0 will have a bunch of idle pages lying around while node
1 is swapping...
(and yes, I have this implemented in the patch I'm working on
and it mostly works. It just needs to be tuned some more before
it's ready for inclusion)
Another thing which we probably want before 2.4 is scanning
big processes more agressively than small processes. I've
implemented most of what is needed for that and it seems to
have a good influence on performance because:
- small processes suffer less from the presence of memory hogs
- memory hogs have their pages aged more agressively, making it
easier for them to do higher throughput from/to swap or disk
The algorithm I'm using for that now is quite simple. At the
time where we assign mm->swap_cnt we remember the biggest
process. After that we do a second loop, and reduce mm->swap_cnt
for smaller processes using this simple formula:
/* small processes are swapped out less */
while ((mm->swap_cnt << 2 * i) < max_cnt)
i++;
mm->swap_cnt >>= i;
mm->swap_cnt += i; /* in case swap_cnt reaches 0 */
We may want to refine this a bit in the future, but this form
seems to work quite well. A possible addition is to set a flag
for all the "big" processes (where i is 0) and have them run
swap_out() on every memory allocation...
regards,
Rik
--
The Internet is not a network of computers. It is a network
of people. That is its real strength.
Wanna talk about the kernel? irc.openprojects.net / #kernelnewbies
http://www.conectiva.com/ http://www.surriel.com/
--
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.eu.org/Linux-MM/
next prev parent reply other threads:[~2000-04-25 17:50 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.21.0004250401520.4898-100000@alpha.random>
2000-04-25 16:57 ` Linus Torvalds
2000-04-25 17:50 ` Rik van Riel [this message]
2000-04-25 18:11 ` Jeff Garzik
2000-04-25 18:33 ` Rik van Riel
2000-04-25 18:53 ` Linus Torvalds
2000-04-25 19:27 ` Rik van Riel
2000-04-26 0:26 ` Linus Torvalds
2000-04-26 1:19 ` Rik van Riel
2000-04-26 1:07 ` Andrea Arcangeli
2000-04-26 2:10 ` Rik van Riel
2000-04-26 11:24 ` Stephen C. Tweedie
2000-04-26 16:44 ` Linus Torvalds
2000-04-26 17:13 ` Rik van Riel
2000-04-26 17:24 ` Linus Torvalds
2000-04-27 13:22 ` Stephen C. Tweedie
2000-04-26 14:19 ` Andrea Arcangeli
2000-04-26 16:52 ` Linus Torvalds
2000-04-26 17:49 ` Andrea Arcangeli
2000-04-26 16:03 Mark_H_Johnson.RTS
2000-04-26 17:06 ` Andrea Arcangeli
2000-04-26 17:36 ` Kanoj Sarcar
2000-04-26 21:58 ` Andrea Arcangeli
2000-04-26 17:43 ` Kanoj Sarcar
2000-04-26 19:06 frankeh
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.21.0004251437540.10408-100000@duckman.conectiva \
--to=riel@conectiva.com.br \
--cc=andrea@suse.de \
--cc=linux-mm@kvack.org \
--cc=riel@nl.linux.org \
--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