linux/arch
Ingo Molnar 509a80c49c x86: fix CONFIG_PAGEALLOC related boot hangs/OOMs
if CONFIG_PAGEALLOC is enabled then X86_FEATURE_PSE is disabled and all
the kernel physical RAM pagetables are set up as 4K pages. This is
needed so that CONFIG_PAGEALLOC can do finegrained mapping and unmapping
of pages.

as a side-effect though, the total size of memory allocated as kernel
pagetables increases significantly. All these pagetables are allocated
via alloc_bootmem_low_pages(), straight out of the lowmem DMA pool. If
the system has enough RAM and a large kernel image then almost all of
the 16 MB lowmem DMA pool is allocated to the image and to pagetables -
leaving no space for __GFP_DMA allocations.

this results in drivers failing and the bootup hanging:

 swapper invoked oom-killer: gfp_mask=0x80d1, order=0, oomkilladj=0
  [<4015059f>] out_of_memory+0x17f/0x1c0
  [<40151f3c>] __alloc_pages+0x37c/0x3a0
  [<40168cd7>] slob_new_page+0x37/0x50
  [<40168dff>] slob_alloc+0x10f/0x190
  [<40169010>] __kmalloc_node+0x80/0x90
  [<405a17e3>] scsi_host_alloc+0x33/0x2c0
  [<405a1a82>] scsi_register+0x12/0x60
  [<40d5889e>] aha1542_detect+0x9e/0x940
  [<405c5ba5>] ultrastor_detect+0x265/0x5f0
  [<401352f5>] getnstimeofday+0x35/0xf0
  [<40d58751>] init_this_scsi_driver+0x41/0xf0
  [<40d0b856>] kernel_init+0x136/0x310
  [<40d58710>] init_this_scsi_driver+0x0/0xf0
  [<40d0b720>] kernel_init+0x0/0x310
  [<40105547>] kernel_thread_helper+0x7/0x10
  =======================

the fix is to first allocate from above the DMA pool, and if that fails
(for example due to it being a machine with less than 16 MB of RAM),
allocate from the DMA pool as a fallback.

With this fix applied i was able to boot a PAGEALLOC=y kernel that would
hang before.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-17 20:15:39 +02:00
..
alpha Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild 2007-10-16 11:23:06 -07:00
arm Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup 2007-10-17 09:00:30 -07:00
avr32 Remove dma_cache_(wback|inv|wback_inv) functions 2007-10-17 08:42:57 -07:00
blackfin Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild 2007-10-16 11:23:06 -07:00
cris remove include/asm-*/ipc.h 2007-10-17 08:42:55 -07:00
frv remove include/asm-*/ipc.h 2007-10-17 08:42:55 -07:00
h8300 remove include/asm-*/ipc.h 2007-10-17 08:42:55 -07:00
i386 Update help text for CONFIG_CRASH_DUMP 2007-10-17 08:43:06 -07:00
ia64 Merge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block 2007-10-17 09:08:13 -07:00
m32r remove include/asm-*/ipc.h 2007-10-17 08:42:55 -07:00
m68k remove include/asm-*/ipc.h 2007-10-17 08:42:55 -07:00
m68knommu remove include/asm-*/ipc.h 2007-10-17 08:42:55 -07:00
mips spin_lock_unlocked cleanups 2007-10-17 08:43:01 -07:00
parisc Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild 2007-10-16 11:23:06 -07:00
powerpc Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2007-10-17 09:05:55 -07:00
ppc Merge branch 'for-2.6.24' of git://git.secretlab.ca/git/linux-2.6-mpc52xx into merge 2007-10-17 22:31:13 +10:00
s390 remove include/asm-*/ipc.h 2007-10-17 08:42:55 -07:00
sh Remove dma_cache_(wback|inv|wback_inv) functions 2007-10-17 08:42:57 -07:00
sh64 Remove dma_cache_(wback|inv|wback_inv) functions 2007-10-17 08:42:57 -07:00
sparc remove include/asm-*/ipc.h 2007-10-17 08:42:55 -07:00
sparc64 Merge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block 2007-10-17 09:08:13 -07:00
um remove include/asm-*/ipc.h 2007-10-17 08:42:55 -07:00
v850 remove include/asm-*/ipc.h 2007-10-17 08:42:55 -07:00
x86 x86: fix CONFIG_PAGEALLOC related boot hangs/OOMs 2007-10-17 20:15:39 +02:00
x86_64 x86: Install unstripped copy of 64bit vdso to disk 2007-10-17 20:15:20 +02:00
xtensa Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild 2007-10-16 11:23:06 -07:00