linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Matthew Dobson <colpatch@us.ibm.com>
Cc: linux-mm@kvack.org, linux-kernel <linux-kernel@vger.kernel.org>,
	"Martin J. Bligh" <mbligh@aracnet.com>,
	William Lee Irwin III <wli@holomorphy.com>,
	Andrea Arcangeli <andrea@suse.de>,
	Andrew Morton <akpm@zip.com.au>,
	Rik van Riel <riel@conectiva.com.br>
Subject: Re: [rfc][patch] GFP_ZONEMASK vs. MAX_NR_ZONES
Date: Fri, 31 Jan 2003 10:15:09 +0000	[thread overview]
Message-ID: <20030131101509.A18876@infradead.org> (raw)
In-Reply-To: <3E39DCE8.8050101@us.ibm.com>; from colpatch@us.ibm.com on Thu, Jan 30, 2003 at 06:18:16PM -0800

On Thu, Jan 30, 2003 at 06:18:16PM -0800, Matthew Dobson wrote:
> Whilst reading through some code for an unrelated patch the other day, I 
> stumbled across the build_zonelist* functions.  It seemed to me that the 
> bounds on the loop seemed too large.
> 
> There are only 3 memory zones: DMA (__GFP_DMA = 0x01), NORMAL, & HIGHMEM 
> (__GFP_DMA = 0x02).  Thus, GFP_ZONEMASK doesn't need to be 0x0f, but 
> only 0x03.  My guess this was to leave room for future zones?  In any 
> case, the loop in build_zonelists should almost certainly not go from 
> i=0..GFP_ZONEMASK.  This instantiates 13 zones that are never used, 
> because there is no case that I could find where any zonemask above 0x02 
> is used.  A zonemask of 0x03 would be DMA | HIGHMEM, but I could not 
> find an instance of that either, probably because it wouldn't make much 
> sense to request a chunk of memory from DMA & HIGHMEM.

Erich Focht added a hack to NEC's tree so he can represent different
nodes on their IA64 machines as memory zones and most 64it architectures
really only needs a single zone (ZONE_NORMAL), so it might be an interesting
option to make all this stuff per-arch..

> 
--
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/

      reply	other threads:[~2003-01-31 10:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-31  2:18 Matthew Dobson
2003-01-31 10:15 ` Christoph Hellwig [this message]

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=20030131101509.A18876@infradead.org \
    --to=hch@infradead.org \
    --cc=akpm@zip.com.au \
    --cc=andrea@suse.de \
    --cc=colpatch@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mbligh@aracnet.com \
    --cc=riel@conectiva.com.br \
    --cc=wli@holomorphy.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