* [patch] Add support for more than 256 zones
@ 2003-08-13 20:23 Jay Lan
2003-08-13 20:55 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Jay Lan @ 2003-08-13 20:23 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-mm
This patch is to support more than 256 zones for large systems.
The changes is to add #ifdef CONFIG_IA64 to mm.h to give different
#define to ZONE_SHIFT.
Thanks,
- jay lan
diff -urN a-2.5.75/include/linux/mm.h b-2.5.75/include/linux/mm.h
--- a-2.5.75/include/linux/mm.h Thu Jul 10 13:04:45 2003
+++ b-2.5.75/include/linux/mm.h Tue Aug 12 17:20:22 2003
@@ -323,7 +323,11 @@
* sets it, so none of the operations on it need to be atomic.
*/
#define NODE_SHIFT 4
+#ifdef CONFIG_IA64
+#define ZONE_SHIFT (BITS_PER_LONG - 10)
+#else
#define ZONE_SHIFT (BITS_PER_LONG - 8)
+#endif
struct zone;
extern struct zone *zone_table[];
For patch to 2.4.21:
diff -urN a-2.4.21/include/linux/mm.h b-2.4.21/include/linux/mm.h
--- a-2.4.21/include/linux/mm.h Fri Jun 13 07:51:38 2003
+++ b-2.4.21/include/linux/mm.h Tue Aug 12 17:19:27 2003
@@ -321,7 +321,11 @@
* sets it, so none of the operations on it need to be atomic.
*/
#define NODE_SHIFT 4
+#ifdef CONFIG_IA64
+#define ZONE_SHIFT (BITS_PER_LONG - 10)
+#else
#define ZONE_SHIFT (BITS_PER_LONG - 8)
+#endif
struct zone_struct;
extern struct zone_struct *zone_table[];
--
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:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] Add support for more than 256 zones
2003-08-13 20:23 [patch] Add support for more than 256 zones Jay Lan
@ 2003-08-13 20:55 ` Andrew Morton
2003-08-13 21:50 ` Martin J. Bligh
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2003-08-13 20:55 UTC (permalink / raw)
To: Jay Lan; +Cc: linux-mm
Jay Lan <jlan@sgi.com> wrote:
>
> This patch is to support more than 256 zones for large systems.
> The changes is to add #ifdef CONFIG_IA64 to mm.h to give different
> #define to ZONE_SHIFT.
>
> Thanks,
> - jay lan
>
>
> diff -urN a-2.5.75/include/linux/mm.h b-2.5.75/include/linux/mm.h
> --- a-2.5.75/include/linux/mm.h Thu Jul 10 13:04:45 2003
> +++ b-2.5.75/include/linux/mm.h Tue Aug 12 17:20:22 2003
> @@ -323,7 +323,11 @@
> * sets it, so none of the operations on it need to be atomic.
> */
> #define NODE_SHIFT 4
> +#ifdef CONFIG_IA64
> +#define ZONE_SHIFT (BITS_PER_LONG - 10)
> +#else
> #define ZONE_SHIFT (BITS_PER_LONG - 8)
> +#endif
Yes, this is good - it gives us five more page flags on 32-bit machines.
Assuming that no 32 bit machiens will ever need more than three zones(?)
Please do it this way:
#ifndef ARCH_NR_ZONES_SHIFT
#define ARCH_NR_ZONES_SHIFT 3
#endif
#define ZONE_SHIFT (BITS_PER_LONG - ARCH_NR_ZONES_SHIFT)
and, in asm-ia64/page.h:
#define ARCH_NR_ZONES 10 /* 1024 zones */
--
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:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] Add support for more than 256 zones
2003-08-13 20:55 ` Andrew Morton
@ 2003-08-13 21:50 ` Martin J. Bligh
0 siblings, 0 replies; 3+ messages in thread
From: Martin J. Bligh @ 2003-08-13 21:50 UTC (permalink / raw)
To: Andrew Morton, Jay Lan; +Cc: linux-mm
> Yes, this is good - it gives us five more page flags on 32-bit machines.
> Assuming that no 32 bit machiens will ever need more than three zones(?)
There has been talk already of a ZONE_DMA32 or whatever (first 4GB).
That'd be useful for quite a few things, so might be nice to leave
space for at least four zones ...
M.
--
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:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-08-13 21:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-13 20:23 [patch] Add support for more than 256 zones Jay Lan
2003-08-13 20:55 ` Andrew Morton
2003-08-13 21:50 ` Martin J. Bligh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox