2001-04-26 01:10:25

by Feng Xian

[permalink] [raw]
Subject: __alloc_pages: 4-order allocation failed

Hi,

I am running linux-2.4.3 on a Dell dual PIII machine with 128M memory.
After the machine runs a while, dmesg shows,

__alloc_pages: 4-order allocation failed.
__alloc_pages: 3-order allocation failed.
__alloc_pages: 4-order allocation failed.
__alloc_pages: 4-order allocation failed.
__alloc_pages: 4-order allocation failed.
__alloc_pages: 4-order allocation failed.


and sometime the system will crash. I looked into the memory info,
there still has some free physical memory (20M) left and swap space is
almost not in use. (250M swap)

I didn't have this problem when I ran 2.4.0 (I even didn't see it on
2.4.2) could anybody tell me what's wrong or where should I look into this
problem?

Thanks,

Alex

--
Feng Xian


2001-04-26 03:28:41

by Marcelo Tosatti

[permalink] [raw]
Subject: Re: __alloc_pages: 4-order allocation failed



On Wed, 25 Apr 2001, Feng Xian wrote:

> Hi,
>
> I am running linux-2.4.3 on a Dell dual PIII machine with 128M memory.
> After the machine runs a while, dmesg shows,
>
> __alloc_pages: 4-order allocation failed.
> __alloc_pages: 3-order allocation failed.
> __alloc_pages: 4-order allocation failed.
> __alloc_pages: 4-order allocation failed.
> __alloc_pages: 4-order allocation failed.
> __alloc_pages: 4-order allocation failed.
>
>
> and sometime the system will crash. I looked into the memory info,
> there still has some free physical memory (20M) left and swap space is
> almost not in use. (250M swap)
>
> I didn't have this problem when I ran 2.4.0 (I even didn't see it on
> 2.4.2) could anybody tell me what's wrong or where should I look into this
> problem?

Feng,

Which apps are you running when this happens ?

Thanks


2001-04-26 06:22:29

by Jeff V. Merkey

[permalink] [raw]
Subject: Re: __alloc_pages: 4-order allocation failed



I am seeing this as well on 2.4.3 with both _get_free_pages() and
kmalloc(). In the kmalloc case, the modules hang waiting
for memory.

Jeff

On Wed, Apr 25, 2001 at 09:09:57PM -0400, Feng Xian wrote:
> Hi,
>
> I am running linux-2.4.3 on a Dell dual PIII machine with 128M memory.
> After the machine runs a while, dmesg shows,
>
> __alloc_pages: 4-order allocation failed.
> __alloc_pages: 3-order allocation failed.
> __alloc_pages: 4-order allocation failed.
> __alloc_pages: 4-order allocation failed.
> __alloc_pages: 4-order allocation failed.
> __alloc_pages: 4-order allocation failed.
>
>
> and sometime the system will crash. I looked into the memory info,
> there still has some free physical memory (20M) left and swap space is
> almost not in use. (250M swap)
>
> I didn't have this problem when I ran 2.4.0 (I even didn't see it on
> 2.4.2) could anybody tell me what's wrong or where should I look into this
> problem?
>
> Thanks,
>
> Alex
>
> --
> Feng Xian
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

2001-04-26 08:57:57

by Mike Galbraith

[permalink] [raw]
Subject: Re: __alloc_pages: 4-order allocation failed

On Thu, 26 Apr 2001, Jeff V. Merkey wrote:

> I am seeing this as well on 2.4.3 with both _get_free_pages() and
> kmalloc(). In the kmalloc case, the modules hang waiting
> for memory.

Would adding __builtin_return_address(0) to the warning help locate?

-Mike

2001-04-26 12:09:46

by Feng Xian

[permalink] [raw]
Subject: Re: __alloc_pages: 4-order allocation failed

On Wed, 25 Apr 2001, Marcelo Tosatti wrote:

>
>
> On Wed, 25 Apr 2001, Feng Xian wrote:
>
> > Hi,
> >
> > I am running linux-2.4.3 on a Dell dual PIII machine with 128M memory.
> > After the machine runs a while, dmesg shows,
> >
> > __alloc_pages: 4-order allocation failed.
> > __alloc_pages: 3-order allocation failed.
> > __alloc_pages: 4-order allocation failed.
> > __alloc_pages: 4-order allocation failed.
> > __alloc_pages: 4-order allocation failed.
> > __alloc_pages: 4-order allocation failed.
> >
> >
> > and sometime the system will crash. I looked into the memory info,
> > there still has some free physical memory (20M) left and swap space is
> > almost not in use. (250M swap)
> >
> > I didn't have this problem when I ran 2.4.0 (I even didn't see it on
> > 2.4.2) could anybody tell me what's wrong or where should I look into this
> > problem?
>
> Feng,
>
> Which apps are you running when this happens ?

It looks like the X consumes most of the memory (almost used up all the
physical memory, more than 100M), it uses NVidia driver. I was also
running pppoe but that took less memory.

>
> Thanks
>
>

--
Feng Xian

2001-04-26 12:12:16

by Feng Xian

[permalink] [raw]
Subject: Re: __alloc_pages: 4-order allocation failed

Thanks for the suggestion. but where to get pre-2.4.4 kernel? when I
looked into the kernel traffic mail list, peoples are talking about 2.4.4,
but i checked kernel.org, the lastest one i found is 2.4.3

regards,

Alex


On Wed, 25 Apr 2001, Mark Hahn wrote:

> > I am running linux-2.4.3 on a Dell dual PIII machine with 128M memory.
>
> 2.4.3 has many known flaws; why not try a pre-2.4.4 kernel?
>
> > __alloc_pages: 4-order allocation failed.
>
> these happen when someone tries to allocate large contiguous blocks.
>
> > and sometime the system will crash. I looked into the memory info,
> > there still has some free physical memory (20M) left and swap space is
> > almost not in use. (250M swap)
>
> your ram is fragmented; it's the contiguity that is causing the failure.
>
> > I didn't have this problem when I ran 2.4.0 (I even didn't see it on
> > 2.4.2) could anybody tell me what's wrong or where should I look into this
> > problem?
>
> you can simply perturb ram (flush, etc), or use a newer kernel.
>

--
Feng Xian
.-.
/v\ L I N U X
// \\
/( )\
^^-^^

2001-04-26 12:30:49

by Andi Kleen

[permalink] [raw]
Subject: Re: __alloc_pages: 4-order allocation failed

On Thu, Apr 26, 2001 at 08:09:06AM -0400, Feng Xian wrote:
> It looks like the X consumes most of the memory (almost used up all the
> physical memory, more than 100M), it uses NVidia driver. I was also
> running pppoe but that took less memory.

You're probably using the NVidia provided driver module, right?
Try it without it and the "nv" driver.


-Andi

2001-04-26 13:51:57

by Feng Xian

[permalink] [raw]
Subject: Re: __alloc_pages: 4-order allocation failed


Yes I am running nvidia module. i tried nv, X use less memory but nv
doesn't give me the NV_GLX extension, xlock will crash for some 3d mode.

Alex

On Thu, 26 Apr 2001, Andi Kleen wrote:

> On Thu, Apr 26, 2001 at 08:09:06AM -0400, Feng Xian wrote:
> > It looks like the X consumes most of the memory (almost used up all the
> > physical memory, more than 100M), it uses NVidia driver. I was also
> > running pppoe but that took less memory.
>
> You're probably using the NVidia provided driver module, right?
> Try it without it and the "nv" driver.
>
>
> -Andi
>

--
Feng Xian
.-.
/v\ L I N U X
// \\ >Phear the Penguin<
/( )\
^^-^^

2001-04-26 13:53:47

by Andi Kleen

[permalink] [raw]
Subject: Re: __alloc_pages: 4-order allocation failed

On Thu, Apr 26, 2001 at 09:50:15AM -0400, Feng Xian wrote:
>
> Yes I am running nvidia module. i tried nv, X use less memory but nv
> doesn't give me the NV_GLX extension, xlock will crash for some 3d mode.

In this case you should report any kernel problems you see to NVidia
first, except if you can also reproduce them without the nvidia module.

-Andi

2001-04-26 13:56:57

by Feng Xian

[permalink] [raw]
Subject: Re: __alloc_pages: 4-order allocation failed


The problem is I didn't see those error message on 2.4.2 or 2.4.0, only on
2.4.3. That's the reason I posted the question here. Maybe I will try
2.4.4

Thanks all for you guys!

Alex

On Thu, 26 Apr 2001, Feng Xian wrote:

>
> Yes I am running nvidia module. i tried nv, X use less memory but nv
> doesn't give me the NV_GLX extension, xlock will crash for some 3d mode.
>
> Alex
>
> On Thu, 26 Apr 2001, Andi Kleen wrote:
>
> > On Thu, Apr 26, 2001 at 08:09:06AM -0400, Feng Xian wrote:
> > > It looks like the X consumes most of the memory (almost used up all the
> > > physical memory, more than 100M), it uses NVidia driver. I was also
> > > running pppoe but that took less memory.
> >
> > You're probably using the NVidia provided driver module, right?
> > Try it without it and the "nv" driver.
> >
> >
> > -Andi
> >
>
>

--
Feng Xian
.-.
/v\ L I N U X
// \\ >Phear the Penguin<
/( )\
^^-^^

2001-04-26 16:50:26

by Szabolcs Szakacsits

[permalink] [raw]
Subject: Re: __alloc_pages: 4-order allocation failed


On Thu, 26 Apr 2001, Jeff V. Merkey wrote:

> I am seeing this as well on 2.4.3 with both _get_free_pages() and
> kmalloc(). In the kmalloc case, the modules hang waiting
> for memory.

One possible source of this hang is due to the change below in
2.4.3, non GPF_ATOMIC and non-recursive allocations (PF_MEMALLOC is set)
will loop until the requested continuous memory is available.

Szaka

diff -u --recursive --new-file v2.4.2/linux/mm/page_alloc.c
linux/mm/page_alloc.c--- v2.4.2/linux/mm/page_alloc.c Sat Feb 3
19:51:32 2001
+++ linux/mm/page_alloc.c Tue Mar 20 15:05:46 2001
@@ -455,8 +455,7 @@
memory_pressure++;
try_to_free_pages(gfp_mask);
wakeup_bdflush(0);
- if (!order)
- goto try_again;
+ goto try_again;
}
}

2001-04-26 17:39:59

by Jeff V. Merkey

[permalink] [raw]
Subject: Re: __alloc_pages: 4-order allocation failed

On Thu, Apr 26, 2001 at 08:00:12PM +0200, Szabolcs Szakacsits wrote:
>
> On Thu, 26 Apr 2001, Jeff V. Merkey wrote:

The request should fail after two or three attempts rather than hang
the entire system waiting for memory.

Jeff

>
> > I am seeing this as well on 2.4.3 with both _get_free_pages() and
> > kmalloc(). In the kmalloc case, the modules hang waiting
> > for memory.
>
> One possible source of this hang is due to the change below in
> 2.4.3, non GPF_ATOMIC and non-recursive allocations (PF_MEMALLOC is set)
> will loop until the requested continuous memory is available.
>
> Szaka
>
> diff -u --recursive --new-file v2.4.2/linux/mm/page_alloc.c
> linux/mm/page_alloc.c--- v2.4.2/linux/mm/page_alloc.c Sat Feb 3
> 19:51:32 2001
> +++ linux/mm/page_alloc.c Tue Mar 20 15:05:46 2001
> @@ -455,8 +455,7 @@
> memory_pressure++;
> try_to_free_pages(gfp_mask);
> wakeup_bdflush(0);
> - if (!order)
> - goto try_again;
> + goto try_again;
> }
> }
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/