Re: Mem issues in 2.6.9 (ever since 2.6.9-rc3) and possible cause

Hiroyuki KAMEZAWA
2004-10-30T09:47:49Z

Chris Ross wrote:

>
>
> Hiroyuki KAMEZAWA escreveu:
>
>> zone->free_area[order]->nr_free is corrupted, this patch fix it.
>>
>> It looks there is no area->nr_free++ code during freeing pages, now.
>
>
> It's corrupt because area is out of scope at that point - it's declared
> within the for loop above.
>
> Should I move your fix into the loop or move the declaration of area to
> function scope?
>
Oh, Okay, my patch was wrong ;(.
Very sorry for wrong hack.
This one will be Okay.

Sorry,
Kame <kamezawa.hiroyu@jp.fujitsu.com>

-

linux-2.6.10-rc1-mm2-kamezawa/mm/page_alloc.c | 1 +
1 files changed, 1 insertion(+)

diff -puN mm/page_alloc.c~cleanup2 mm/page_alloc.c
--- linux-2.6.10-rc1-mm2/mm/page_alloc.c~cleanup2 2004-10-30 18:40:19.024529640 +0900
+++ linux-2.6.10-rc1-mm2-kamezawa/mm/page_alloc.c 2004-10-30 18:40:40.225306632 +0900
@@ -262,6 +262,7 @@ static inline void __free_pages_bulk (st
coalesced = base + page_idx;
set_page_order(coalesced, order);
list_add(&coalesced->lru, &zone->free_area[order].free_list);
+ zone->free_area[order].nr_free++;
}

static inline void free_pages_check(const char *function, struct page *page)

_