Re: __alloc_pages: 0-order allocation failed

Marcelo Tosatti (marcelo@conectiva.com.br)
Mon, 24 Sep 2001 09:38:24 -0300 (BRT)


On 24 Sep 2001, Paul Larson wrote:

> On 24 Sep 2001 08:12:20 -0300, Marcelo Tosatti wrote:
> >
> >
> > On Mon, 24 Sep 2001, Jacek [iso-8859-2] Popławski wrote:
> >
> > > I just installed 2.4.10, and...
> > >
> > > __alloc_pages: 0-order allocation failed (gfp=0x1d2/0) from c0126c2e
> > > __alloc_pages: 0-order allocation failed (gfp=0x1d2/0) from c0126c2e
> > > __alloc_pages: 0-order allocation failed (gfp=0x1d2/0) from c0126c2e
> > > VM: killing process donkey_s
> ...
>
> I'm getting a lot of this with 2.4.10 also. At the time, I had KDM
> running, but I was coming into the box over telnet and running the
> latest released version of LTP. The test it appeared to be on at the
> time was a filesystem test called growfiles. Nothing else was running
> other than these things and standard system services. The machine has
> 256 MB of ram, and 512 MB swap. The order that things got killed in
> were sadc, sar, kdm, X, in.telnetd, xinetd (ouch).
>
>
> __alloc_pages: 0-order allocation failed (gfp=0xf0/0) from c012b9b2
> __alloc_pages: 0-order allocation failed (gfp=0x1d2/0) from c012b9b2
> VM: killing process xinetd
> __alloc_pages: 0-order allocation failed (gfp=0x1d2/0) from c012b9b2
> __alloc_pages: 0-order allocation failed (gfp=0x1d2/0) from c012b9b2
> __alloc_pages: 0-order allocation failed (gfp=0x1d2/0) from c012b9b2

For the people having the allocation failure problems, please try the
following patch.

Currently the page freeing success accounting is completly broken (it does
not report a task has made progress while it did), and the page allocation
code uses that information to know if it should or not try to keep calling
the freeing code.

Please test this.

--- linux.orig/mm/vmscan.c Mon Sep 24 10:36:40 2001
+++ linux/mm/vmscan.c Mon Sep 24 10:54:01 2001
@@ -567,6 +567,9 @@
if (nr_pages <= 0)
return 1;

+ if (nr_pages < SWAP_CLUSTER_MAX)
+ ret |= 1;
+
ret |= swap_out(priority, classzone, gfp_mask, SWAP_CLUSTER_MAX << 2);
} while (--priority);

--- linux.orig/mm/page_alloc.c Mon Sep 24 10:36:40 2001
+++ linux/mm/page_alloc.c Mon Sep 24 10:44:12 2001
@@ -400,7 +400,7 @@
if (!z)
break;

- if (zone_free_pages(z, order) > z->pages_high) {
+ if (zone_free_pages(z, order) > z->pages_min) {
page = rmqueue(z, order);
if (page)
return page;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/