2001-07-10 22:02:06

by hunghochak

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

Hi,

When I run a module, sometimes it gives such an error __alloc_pages 4 order allocation failed.
However, there is only 0 order page allocation function call within the whole module.
Does anyone know where does the 4 order allocation failure comes from?
Thanks

Steven
__________________________________________________________________
Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/


2001-07-11 17:20:22

by hunghochak

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

Hi,
but there isn't any call in the module to allocate 4 order pages. There are only calls to allocate 0 order pages. alloc_pages(GFP_KERNEL, 0)is the only call to allocate page in the whole module.

Mike Galbraith <[email protected]> wrote:
>
> On Tue, 10 Jul 2001, Ho Chak Hung wrote:
>
> > Hi,
> >
> > When I run a module, sometimes it gives such an error __alloc_pages 4 order allocation failed.
> > However, there is only 0 order page allocation function call within the whole module.
> > Does anyone know where does the 4 order allocation failure comes from?
> > Thanks
>
> Memory fragmentation. ?It is never safe to assume that high order
> allocations will succeed.
>
> ? ? -Mike
>
>
__________________________________________________________________
Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/

2001-07-11 17:32:44

by Mike Galbraith

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

On Wed, 11 Jul 2001, Ho Chak Hung wrote:

> Hi,
> but there isn't any call in the module to allocate 4 order pages. There are only calls to allocate 0 order pages. alloc_pages(GFP_KERNEL, 0)is the only call to allocate page in the whole module.

Then it's not your module :)

Some driver may be asking for order 4, but settling for less when
that fails.

-Mike

2001-07-12 07:34:33

by Steffen Persvold

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

Mike Galbraith wrote:
>
> On Wed, 11 Jul 2001, Ho Chak Hung wrote:
>
> > Hi,
> > but there isn't any call in the module to allocate 4 order pages. There are only calls to allocate 0 order pages. alloc_pages(GFP_KERNEL, 0)is the only call to allocate page in the whole module.
>
> Then it's not your module :)
>
> Some driver may be asking for order 4, but settling for less when
> that fails.
>
Why did this get worse on the 2.4 kernel ?. On 2.2 I always seemed to get my high order
allocations and GFP_ATOMIC seldom failed when there was available memory.

Regards,
--
Steffen Persvold Systems Engineer
Email : mailto:[email protected] Scali AS (http://www.scali.com)
Tlf : (+47) 22 62 89 50 Olaf Helsets vei 6
Fax : (+47) 22 62 89 51 N-0621 Oslo, Norway

2001-07-12 11:20:44

by Mike Galbraith

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

On Thu, 12 Jul 2001, Steffen Persvold wrote:

> Mike Galbraith wrote:
> >
> > On Wed, 11 Jul 2001, Ho Chak Hung wrote:
> >
> > > Hi,
> > > but there isn't any call in the module to allocate 4 order pages. There are only calls to allocate 0 order pages. alloc_pages(GFP_KERNEL, 0)is the only call to allocate page in the whole module.
> >
> > Then it's not your module :)
> >
> > Some driver may be asking for order 4, but settling for less when
> > that fails.
> >
> Why did this get worse on the 2.4 kernel ?. On 2.2 I always seemed to get my high order
> allocations and GFP_ATOMIC seldom failed when there was available memory.

If 2.2 manages to service high order allocations better than 2.4, I'd
say it must be due to dumb luck more than anything else. If you keep
most of your ram allocated (both 2.2 and 2.4 do), and don't do active
defragmentation (neither does), it's a roll of the dice whether you
have a contiguous chunk of ram to dole out or not.

wrt GFP_ATOMIC failing when memory is available, that doesn't happen
unless they are high order allocations. If you mean caches when you
say 'available', cache pages are not necessarily reclaimable at all,
much less instantly as would be required to service atomic allocations.

-Mike