android_kernel_xiaomi_sm7250/arch/i386
Christoph Lameter 776ed98b84 [PATCH] reduce MAX_NR_ZONES: remove two strange uses of MAX_NR_ZONES
I keep seeing zones on various platforms that are never used and wonder why we
compile support for them into the kernel.  Counters show up for HIGHMEM and
DMA32 that are alway zero.

This patch allows the removal of ZONE_DMA32 for non x86_64 architectures and
it will get rid of ZONE_HIGHMEM for arches not using highmem (like 64 bit
architectures).  If an arch does not define CONFIG_HIGHMEM then ZONE_HIGHMEM
will not be defined.  Similarly if an arch does not define CONFIG_ZONE_DMA32
then ZONE_DMA32 will not be defined.

No current architecture uses all the 4 zones (DMA,DMA32,NORMAL,HIGH) that we
have now.  The patchset will reduce the number of zones for all platforms.

On many platforms that do not have DMA32 or HIGHMEM this will reduce the
number of zones by 50%.  F.e.  ia64 only uses DMA and NORMAL.

Large amounts of memory can be saved for larger systemss that may have a few
hundred NUMA nodes.

With ZONE_DMA32 and ZONE_HIGHMEM support optional MAX_NR_ZONES will be 2 for
many non i386 platforms and even for i386 without CONFIG_HIGHMEM set.

Tested on ia64, x86_64 and on i386 with and without highmem.

The patchset consists of 11 patches that are following this message.

One could go even further than this patchset and also make ZONE_DMA optional
because some platforms do not need a separate DMA zone and can do DMA to all
of memory.  This could reduce MAX_NR_ZONES to 1.  Such a patchset will
hopefully follow soon.

This patch:

Fix strange uses of MAX_NR_ZONES

Sometimes we use MAX_NR_ZONES - x to refer to a zone.  Make that explicit.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-26 08:48:46 -07:00
..
boot kbuild: introduce utsrelease.h 2006-07-03 23:30:54 +02:00
crypto [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
kernel [PATCH] convert i386 NUMA KVA space to bootmem 2006-09-26 08:48:45 -07:00
lib [PATCH] i386: remove redundant might_sleep() in user accessors. 2006-07-14 21:53:52 -07:00
mach-default [PATCH] irq-flags: i386: Use the new IRQF_ constants 2006-07-02 13:58:47 -07:00
mach-es7000 [PATCH] Compilation fix for ES7000 when no ACPI is specified in config (i386) 2006-03-23 07:38:04 -08:00
mach-generic Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
mach-visws [PATCH] irq-flags: i386: Use the new IRQF_ constants 2006-07-02 13:58:47 -07:00
mach-voyager [PATCH] irq-flags: i386: Use the new IRQF_ constants 2006-07-02 13:58:47 -07:00
math-emu [PATCH] i386: inline assembler: cleanup and encapsulate descriptor and task register management 2005-09-05 00:06:11 -07:00
mm [PATCH] reduce MAX_NR_ZONES: remove two strange uses of MAX_NR_ZONES 2006-09-26 08:48:46 -07:00
oprofile [PATCH] i386/x86-64: Add core 2 to oprofile 2006-09-16 21:37:48 -07:00
pci Revert mmiocfg heuristics and blacklist changes 2006-09-19 08:15:22 -07:00
power Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
defconfig [PATCH] i386 defconfig: set CONFIG_PM_STD_PARTITION="" 2006-07-10 13:24:22 -07:00
Kconfig [PATCH] x86: NUMAQ Kconfig fix 2006-08-27 11:01:33 -07:00
Kconfig.cpu i386: Trivial typo fixes 2006-06-26 18:47:15 +02:00
Kconfig.debug [PATCH] lockdep: irqtrace subsystem, i386 support 2006-07-03 15:27:03 -07:00
Makefile [PATCH] x86: "make isoimage" support; FDINITRD= support; minor cleanups 2006-03-26 08:56:53 -08:00
Makefile.cpu [PATCH] x86-64: Use -mtune=generic for generic kernels 2006-03-25 09:10:52 -08:00