From: Matthew Dobson <colpatch@us.ibm.com>
To: Andrew Morton <akpm@osdl.org>, Andi Kleen <ak@suse.de>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.10-rc2-mm4
Date: Tue, 30 Nov 2004 17:37:53 -0800 [thread overview]
Message-ID: <1101865072.20437.4.camel@arrakis> (raw)
In-Reply-To: <20041130095045.090de5ea.akpm@osdl.org>
On Tue, 2004-11-30 at 09:50, Andrew Morton wrote:
> +x86_64-experimental-4gb-dma-zone.patch
>
> Add a fourth memory zone on x86_64: ZONE_DMA32
Andi,
I think you made a small mistake in this patch. There should be no
need to modify ZONES_SHIFT or MAX_ZONES_SHIFT for the change you wish to
make, since 4 zones (0..3) still fit into 2 bits.
Also, while building a kernel, I hit an error due to this patch:
arch/i386/kernel/srat.c:line #142.
The function looks ok to my untrained eyes, but I'm not sure. I'm
building a test kernel with the attached patch applied and I'll let you
know if it barfs.
-Matt
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.10-rc2-mm4/arch/i386/kernel/srat.c linux-2.6.10-rc2-mm4-MAX_NR_ZONES-fixlet/arch/i386/kernel/srat.c
--- linux-2.6.10-rc2-mm4/arch/i386/kernel/srat.c 2004-11-30 15:04:38.000000000 -0800
+++ linux-2.6.10-rc2-mm4-MAX_NR_ZONES-fixlet/arch/i386/kernel/srat.c 2004-11-30 17:23:56.000000000 -0800
@@ -139,7 +139,7 @@ static void __init parse_memory_affinity
}
#if MAX_NR_ZONES != 3
-#error "MAX_NR_ZONES != 3, chunk_to_zone requires review"
+#warning "MAX_NR_ZONES != 3, chunk_to_zone requires review"
#endif
/* Take a chunk of pages from page frame cstart to cend and count the number
* of pages in each zone, returned via zones[].
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.10-rc2-mm4/include/linux/mmzone.h linux-2.6.10-rc2-mm4-MAX_NR_ZONES-fixlet/include/linux/mmzone.h
--- linux-2.6.10-rc2-mm4/include/linux/mmzone.h 2004-11-30 15:05:21.000000000 -0800
+++ linux-2.6.10-rc2-mm4-MAX_NR_ZONES-fixlet/include/linux/mmzone.h 2004-11-30 17:23:36.000000000 -0800
@@ -68,7 +68,7 @@ struct per_cpu_pageset {
#define ZONE_HIGHMEM 3
#define MAX_NR_ZONES 4 /* Sync this with ZONES_SHIFT */
-#define ZONES_SHIFT 3 /* ceil(log2(MAX_NR_ZONES)) */
+#define ZONES_SHIFT 2 /* ceil(log2(MAX_NR_ZONES)) */
/*
@@ -101,7 +101,7 @@ struct per_cpu_pageset {
/*
* On machines where it is needed (eg PCs) we divide physical memory
- * into multiple physical zones. On a PC we have 3 zones:
+ * into multiple physical zones. On a PC we have 4 zones:
*
* ZONE_DMA < 16 MB ISA DMA capable memory
* ZONE_DMA32 0 MB Empty
@@ -393,7 +393,7 @@ extern struct pglist_data contig_page_da
#if BITS_PER_LONG == 32 || defined(ARCH_HAS_ATOMIC_UNSIGNED)
/*
* with 32 bit page->flags field, we reserve 8 bits for node/zone info.
- * there are 3 zones (2 bits) and this leaves 8-2=6 bits for nodes.
+ * there are 4 zones (2 bits) and this leaves 8-2=6 bits for nodes.
*/
#define MAX_NODES_SHIFT 6
#elif BITS_PER_LONG == 64
@@ -409,8 +409,8 @@ extern struct pglist_data contig_page_da
#error NODES_SHIFT > MAX_NODES_SHIFT
#endif
-/* There are currently 3 zones: DMA, Normal & Highmem, thus we need 2 bits */
-#define MAX_ZONES_SHIFT 3
+/* There are currently 4 zones: DMA, DMA32, Normal & Highmem, thus we need 2 bits */
+#define MAX_ZONES_SHIFT 2
#if ZONES_SHIFT > MAX_ZONES_SHIFT
#error ZONES_SHIFT > MAX_ZONES_SHIFT
next prev parent reply other threads:[~2004-12-01 1:42 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-30 17:50 2.6.10-rc2-mm4 Andrew Morton
2004-11-30 18:06 ` 2.6.10-rc2-mm4 Arjan van de Ven
2004-11-30 18:21 ` 2.6.10-rc2-mm4 Andrew Morton
2004-11-30 18:25 ` 2.6.10-rc2-mm4 Arjan van de Ven
2004-11-30 18:32 ` 2.6.10-rc2-mm4 Andrew Morton
2004-11-30 17:44 ` 2.6.10-rc2-mm4 Alan Cox
2004-11-30 19:46 ` 2.6.10-rc2-mm4 Andrew Morton
2004-11-30 19:36 ` 2.6.10-rc2-mm4 Arjan van de Ven
2004-11-30 18:48 ` 2.6.10-rc2-mm4 William Lee Irwin III
2004-12-02 8:03 ` 2.6.10-rc2-mm4 Jes Sorensen
2004-12-02 8:01 ` 2.6.10-rc2-mm4 Jes Sorensen
2004-11-30 18:31 ` 2.6.10-rc2-mm4 Christoph Hellwig
2004-11-30 18:38 ` 2.6.10-rc2-mm4 Alan Cox
2004-11-30 18:30 ` 2.6.10-rc2-mm4 Christoph Hellwig
2004-11-30 19:18 ` 2.6.10-rc2-mm4 Stephen Smalley
2004-11-30 19:29 ` 2.6.10-rc2-mm4 Chris Wright
2004-11-30 19:43 ` 2.6.10-rc2-mm4 Christoph Hellwig
2004-11-30 19:55 ` 2.6.10-rc2-mm4 Jeff Mahoney
2004-12-01 23:32 ` 2.6.10-rc2-mm4 Jeffrey Mahoney
2004-12-02 1:01 ` 2.6.10-rc2-mm4 Chris Wright
2004-12-02 1:11 ` 2.6.10-rc2-mm4 Jeff Mahoney
2004-12-02 13:32 ` 2.6.10-rc2-mm4 Stephen Smalley
2004-12-02 13:15 ` 2.6.10-rc2-mm4 Stephen Smalley
2004-12-07 19:57 ` 2.6.10-rc2-mm4 Jeff Mahoney
2004-12-07 20:28 ` 2.6.10-rc2-mm4 Stephen Smalley
2004-12-07 22:46 ` 2.6.10-rc2-mm4 Jeff Mahoney
2004-12-08 13:28 ` 2.6.10-rc2-mm4 Stephen Smalley
2004-11-30 23:07 ` 2.6.10-rc2-mm4 - cifs.ko needs unknown symbol CIFSSMBSetPosixACL Eyal Lebedinsky
2004-11-30 23:53 ` Andrew Morton
2004-12-01 1:37 ` Matthew Dobson [this message]
2004-12-03 9:23 ` 2.6.10-rc2-mm4 Andi Kleen
2004-12-01 8:43 ` 2.6.10-rc2-mm4 - cifs.ko needs unknown symbol CIFSSMBSetPosixACL Eyal Lebedinsky
2004-12-01 21:10 ` 2.6.10-rc2-mm4 Adrian Bunk
2004-12-01 22:26 ` 2.6.10-rc2-mm4 Bill Davidsen
2004-12-02 0:18 ` 2.6.10-rc2-mm4 Bjorn Helgaas
2004-12-01 22:26 ` 2.6.10-rc2-mm4: NUMA-related oops on dual-Opteron Rafael J. Wysocki
2004-12-02 1:01 ` [PATCH] make gconfig work with gtk-2.4 J.A. Magallon
2004-12-02 8:21 ` Andrew Morton
2004-12-02 12:56 ` Roman Zippel
2004-12-02 13:22 ` J.A. Magallon
2004-12-03 9:06 ` [PATCH hostap] fix Kconfig typos and missing select CRYPTO (was: 2.6.10-rc2-mm4) Joshua Kwan
2004-12-03 9:50 ` oom goodness Re: 2.6.10-rc2-mm4 Chris Ross
2004-12-03 16:07 ` Randy.Dunlap
2004-12-03 22:16 ` Thomas Gleixner
2004-12-09 11:07 ` 2.6.10-rc2-mm4 William Lee Irwin III
-- strict thread matches above, loose matches on Subject: below --
2004-11-30 18:29 2.6.10-rc2-mm4 Petr Vandrovec
2004-11-30 18:38 ` 2.6.10-rc2-mm4 Alan Cox
2004-12-03 21:59 2.6.10-rc2-mm4 Terence Ripperda
2004-12-05 19:46 ` 2.6.10-rc2-mm4 Alan Cox
[not found] <41BF2332.mailL911D9Q6T@suse.de.suse.lists.linux.kernel>
2004-12-14 19:00 ` 2.6.10-rc2-mm4 Andi Kleen
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=1101865072.20437.4.camel@arrakis \
--to=colpatch@us.ibm.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.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