linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Christoph Lameter <clameter@sgi.com>
Cc: Martin Bligh <mbligh@mbligh.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	akpm@google.com, linux-kernel@vger.kernel.org,
	Christoph Hellwig <hch@infradead.org>,
	James Bottomley <James.Bottomley@steeleye.com>,
	linux-mm@kvack.org
Subject: More thoughts on getting rid of ZONE_DMA
Date: Sat, 23 Sep 2006 01:34:45 +0200	[thread overview]
Message-ID: <200609230134.45355.ak@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0609221321280.9181@schroedinger.engr.sgi.com>

On Friday 22 September 2006 22:23, Christoph Lameter wrote:
> Here is an iniitial patch of alloc_pages_range (untested, compiles). 
> Directed reclaim missing. Feedback wanted. There are some comments in the 
> patch where I am at the boundary of my knowledge and it would be good if 
> someone could supply the info needed.


Christoph,

I thought a little more about the problem.

Currently I don't think we can get rid of ZONE_DMA even with your patch.

The problem is that if someone has a workload with lots of pinned pages
(e.g. lots of mlock) then the first 16MB might fill up completely and there 
is no chance at all to free it because it's pinned

This is not theoretical: Andrea originally implemented the keep lower zones free 
heuristics exactly because this happened in the field.

So we need some way to reserve some low memory pages (a "low mem mempool" so to
say). Otherwise it could always run into deadlocks later under load.

As I understand it your goal is to remove knowledge of the DMA zones from
the generic VM to save some cache lines in hot paths.

First ZONE_DMA32 likely needs to be kept in the normal allocator because there 
are just too many potential users of it, and some of them even need fast memory allocation.

But AFAIK all 16MB ZONE_DMA don't need fast allocation, so being a bit
slower for them is ok.

What we could do instead is to have a configurable pool starting at zero with
a special allocator that can allocate ranges in there. This wouldn't need to 
be a 16MB pool, but could be a kernel boot parameter.  This would keep
it completely out of the fast VM path and reach your original goals.

This would also fix aacraid because users of it could just configure a larger 
pool (we could potentially even have a heuristic to size it based on PCI IDs;
this wouldn't deal with hotplug but would be still much better than shifting
it completely to the user) 

-Andi

--
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-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2006-09-22 23:34 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-22  4:02 [RFC] Initial alpha-0 for new page allocator API Christoph Lameter
2006-09-22  6:17 ` Andi Kleen
2006-09-22 16:35   ` Christoph Lameter
2006-09-22 19:10     ` Andi Kleen
2006-09-22 19:17       ` Christoph Lameter
2006-09-22 19:24       ` Martin Bligh
2006-09-22 20:10       ` Alan Cox
2006-09-22 20:02         ` Andi Kleen
2006-09-22 20:14           ` Martin Bligh
2006-09-22 20:23             ` Christoph Lameter
2006-09-22 20:41               ` Jesse Barnes
2006-09-22 21:01                 ` Christoph Lameter
2006-09-22 21:14                   ` Jesse Barnes
2006-09-22 21:21                     ` Christoph Lameter
2006-09-22 20:48               ` Andi Kleen
2006-09-22 21:13                 ` Christoph Lameter
2006-09-22 21:32                 ` Christoph Lameter
2006-09-22 23:34               ` Andi Kleen [this message]
2006-09-23  0:23                 ` More thoughts on getting rid of ZONE_DMA Christoph Lameter
2006-09-23  0:39                   ` Andi Kleen
2006-09-23  0:25                 ` Christoph Lameter
2006-09-23  0:37                   ` Andi Kleen
2006-09-24  2:13                 ` Christoph Lameter
2006-09-24  2:36                   ` Martin J. Bligh
2006-09-24  7:26                     ` Andi Kleen
2006-09-24  7:19                   ` Andi Kleen
2006-09-22 17:36   ` [RFC] Initial alpha-0 for new page allocator API Christoph Lameter

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=200609230134.45355.ak@suse.de \
    --to=ak@suse.de \
    --cc=James.Bottomley@steeleye.com \
    --cc=akpm@google.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=clameter@sgi.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mbligh@mbligh.org \
    /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