lkml.org 
[lkml]   [2008]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] [11/18] Fix alignment bug in bootmem allocator
please check the one against -mm and x86.git

---
From: Andi Kleen <ak@suse.de>

[PATCH] mm: offset align in alloc_bootmem

need offset alignment when node_boot_start's alignment is less than
align required

Index: linux-2.6/mm/bootmem.c
===================================================================
--- linux-2.6.orig/mm/bootmem.c
+++ linux-2.6/mm/bootmem.c
@@ -257,7 +257,7 @@ restart_scan:
unsigned long j;

i = find_next_zero_bit(bdata->node_bootmem_map, eidx, i);
- i = ALIGN(i, incr);
+ i = ALIGN(i + offset, incr) - offset;
if (i >= eidx)
break;
if (test_bit(i, bdata->node_bootmem_map)) {
@@ -273,7 +273,7 @@ restart_scan:
start = i;
goto found;
fail_block:
- i = ALIGN(j, incr);
+ i = ALIGN(j + offset, incr) - offset;
if (i == j)
i += incr;
}
\
 
 \ /
  Last update: 2008-03-17 09:13    [W:0.091 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site