Hi all,
Lately I've been struggeling with kernels Oopsing in page_alloc.c,
rmqueue() function. The line which triggers the Oops is actually in
expand() which is inlined from rmqueue() (and others). In my kernel source
(2.4.20-pre11), expand looks like this :
#define MARK_USED(index, order, area) \
__change_bit((index) >> (1+(order)), (area)->map)
static inline struct page * expand (zone_t *zone, struct page *page,
unsigned long index, int low, int high, free_area_t * area)
{
unsigned long size = 1 << high;
while (high > low) {
if (BAD_RANGE(zone,page))
BUG();
area--;
high--;
size >>= 1;
list_add(&(page)->list, &(area)->free_list);
MARK_USED(index, high, area);
index += size;
page += size;
}
if (BAD_RANGE(zone,page))
BUG();
return page;
}
The line that triggers the BUG is the last BAD_RANGE check. The module
that calls __alloc_pages() is doing it in the following way :
addr = __get_free_page(GFP_KERNEL);
and frees the page with free_page(addr);
The machine configuration is RedHat 7.3 (gcc-2.96-110,
binutils-2.11.93.0.2-11), 2 Xeon processors @ 2.2 GHz and 2GB RAM.
The module in question is not a part of the kernel tree, but the source is
available if someone is interested. However, I'm really interrested in
situations that could cause BAD_RANGE() to fail (since it is commented
with a "Temporary debugging check") because of the above usage (which
seems very straight forward to me).
The really strange thing is that the problem seem to disappear if I apply
the per_cpu_pages patch by Ingo Molnar as found in the RedHat
2.4.18-17.7.x kernel with a few modifications to make it fit on
2.4.20-pre11 (attached).
Any help greatly appreciated.
Thanks,
--
Steffen Persvold | Scali AS
mailto:sp@scali.com | http://www.scali.com
Tel: (+47) 2262 8950 | Olaf Helsets vei 6
Fax: (+47) 2262 8951 | N0621 Oslo, NORWAY
This archive was generated by hypermail 2b29 : Thu Oct 31 2002 - 22:00:41 EST