From: Rik van Riel <riel@nl.linux.org>
To: "David S. Miller" <davem@redhat.com>
Cc: mingo@chiara.csoma.elte.hu, kanoj@google.engr.sgi.com,
andrea@suse.de, torvalds@transmeta.com,
linux-kernel@vger.rutgers.edu, linux-mm@kvack.org
Subject: Re: [RFC] [RFT] [PATCH] memory zone balancing
Date: Thu, 6 Jan 2000 20:14:53 +0100 [thread overview]
Message-ID: <Pine.LNX.4.10.10001061926150.584-100000@mirkwood.dummy.home> (raw)
In-Reply-To: <200001061528.HAA05974@pizda.ninka.net>
On Thu, 6 Jan 2000, David S. Miller wrote:
> Date: Thu, 6 Jan 2000 17:05:41 +0100 (CET)
> From: Ingo Molnar <mingo@chiara.csoma.elte.hu>
>
> i think this is pretty much 'type-dependent'. In earlier versions
> of the zone allocator i added a zone->memory_balanced() function
> (but removed it later because it first needed the things your patch
> adds). Then every zone can decide for itself wether it's
> balanced. Eg. the DMA zone is rather critical and we want to keep
> it free aggressively (part of that is already achieved by placing
> it at the end of the zone chain), the highmem zone might not need
> any balancing at all, the normal zone wants some high/low watermark
> stuff.
>
> Let's be careful not to design any balancing heuristics which will
> fall apart on architectures where only one zone ever exists (because
> GFP_DMA is completely meaningless).
We'll have to keep the current constraint (freepages.{min,low,high})
stuff as our overall target anyway. We simply need to add some limits
that the special zones have to target for.
And it won't just be tested from kswapd(); swap_tick() and maybe
even __get_pages() will have to check for the constraints too and
wake up kswapd() or take action themselves...
Possible heuristics (using d for dma, n for normal and high for
high free mem; limit = freepages.*) could use the following targets:
d + n > limit
d > limit/4
n > limit/4
h < limit * 2 (because we don't care about free high pages
and we do care about free normal and dma pages)
Another possibility is to include the highmem (d + n + h > limit)
and keep the single low-mem limits.
IMHO there should be a number of constraints for a heuristic
like this:
- simple
- not force too much memory free
- the algorithm should have freedom in what to free, in order
to avoid excessive scanning (alt: separate queues per zone)
- the limits for dma and normal memory should be high enough
to be able to fulfill kernel allocations
- should have no impact on non-zoned machines
The (extremely simple) constraints above should probably be
enough to actually get the job done. At least, I wouldn't
know why we'd need more...
cheers,
Rik
--
The Internet is not a network of computers. It is a network
of people. That is its real strength.
--
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.nl.linux.org/Linux-MM/
next prev parent reply other threads:[~2000-01-06 19:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-12-15 19:50 Kanoj Sarcar
1999-12-17 7:27 ` Mike Galbraith
1999-12-27 16:00 ` Andrea Arcangeli
1999-12-27 16:06 ` Andrea Arcangeli
2000-01-04 2:27 ` Kanoj Sarcar
2000-01-04 3:23 ` Rik van Riel
2000-01-04 15:47 ` Rik van Riel
2000-01-06 16:05 ` Ingo Molnar
2000-01-06 15:28 ` David S. Miller
2000-01-06 18:36 ` Kanoj Sarcar
2000-01-06 19:14 ` Rik van Riel [this message]
2000-01-04 19:42 Rik van Riel
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.10.10001061926150.584-100000@mirkwood.dummy.home \
--to=riel@nl.linux.org \
--cc=andrea@suse.de \
--cc=davem@redhat.com \
--cc=kanoj@google.engr.sgi.com \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=mingo@chiara.csoma.elte.hu \
--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