lkml.org 
[lkml]   [2005]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Trivial fix in __alloc_bootmem_core() when there is no free page in first node's memory
Hi,
Hitting BUG_ON() in __alloc_bootmem_core() when there is no free
page available in the first node's memory. For the case of kdump on
PPC64 (Power 4 machine), the captured kernel is used two memory regions
- memory for TCE tables (tce-base and tce-size at top of RAM and
reserved) and captured kernel memory region (crashk_base and
crashk_size). Since we reserve the memory for the first node, we should
be returning from __alloc_bootmem_core() to search for the next node
(pg_dat).

Currently, find_next_zero_bit() is returning the n^th bit (eidx) when
there is no free page. Then, test_bit() is failed since we set 0xff only
for the actual size initially (init_bootmem_core()) even though rounded
up to one page for bdata->node_bootmem_map. We are hitting the BUG_ON
after failing to enter second "for" loop.

Please apply.

Thanks
Haren

Signed-off-by: Haren Myneni <haren@us.ibm.com>




--- 2.6.15-rc5-git1/mm/bootmem.c.orig 2005-12-14 21:28:46.000000000 -0800
+++ 2.6.15-rc5-git1/mm/bootmem.c 2005-12-14 21:35:54.000000000 -0800
@@ -204,6 +204,8 @@ restart_scan:
unsigned long j;
i = find_next_zero_bit(bdata->node_bootmem_map, eidx, i);
i = ALIGN(i, incr);
+ if (i >= eidx)
+ break;
if (test_bit(i, bdata->node_bootmem_map))
continue;
for (j = i + 1; j < i + areasize; ++j) {
\
 
 \ /
  Last update: 2005-12-07 02:57    [W:0.023 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site