2004-01-01 10:03:34

by Andrew Morton

[permalink] [raw]
Subject: Re: Memory management problem with 2.6.0

[email protected] wrote:
>
> On Sat, 27 Dec 2003, Andrew Morton wrote:
>
> > [email protected] wrote:
> > >
> > > I have a small script:
> > > #!/bin/sh
> > > umount /mnt/cdrom
> > > eject /dev/hdb
> > > echo "Invalid system disk"
> > > echo "Insert and press any key when ready"
> > > read junk
> > > eject -t /dev/hdb
> > > sleep 1
> > > mount /mnt/cdrom
> > > /usr/sbin/hdparm -E 10 /dev/hdb
> > >
> > > It works all the time but today gave me this:
> > >
> > > In the logs I had:
> > > Dec 27 19:06:16 grinch kernel: eject: page allocation failure. order:4,
> > > mode:0xd0
> >
> > Please, try
> >
> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.0/2.6.0-mm1/broken-out/cdrom-allocation-try-harder.patch
> >
> > and let me know?
> >
>
> for cdrom it *seems* to work.
>
> The problem continues however for other applications
> It is not specific to the ide-cd driver. The same problem happens
> sometimes
> with mplayer also
>
> Dec 30 22:07:12 grinch kernel: mplayer: page allocation failure. order:4,
> mode:0x21

OK, there's another one. Please apply

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.0/2.6.0-mm2/broken-out/page-alloc-failure-dump_stack.patch

and send the backtrace.


2004-01-03 01:01:46

by caszonyi

[permalink] [raw]
Subject: Re: Memory management problem with 2.6.0

On Thu, 1 Jan 2004, Andrew Morton wrote:

> [email protected] wrote:
> >
> > On Sat, 27 Dec 2003, Andrew Morton wrote:
> >
> > > >
> > > > In the logs I had:
> > > > Dec 27 19:06:16 grinch kernel: eject: page allocation failure. order:4,
> > > > mode:0xd0
> > >
> > > Please, try
> > >
> > > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.0/2.6.0-mm1/broken-out/cdrom-allocation-try-harder.patch
> > >
> > > and let me know?
> > >
> >
> > for cdrom it *seems* to work.
> >
> > The problem continues however for other applications
> > It is not specific to the ide-cd driver. The same problem happens
> > sometimes
> > with mplayer also
> >
> > Dec 30 22:07:12 grinch kernel: mplayer: page allocation failure. order:4,
> > mode:0x21
>
> OK, there's another one. Please apply
>
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.0/2.6.0-mm2/broken-out/page-alloc-failure-dump_stack.patch
>
> and send the backtrace.
>

see atached file


Attachments:
dmesg (14.89 kB)

2004-01-03 01:22:48

by Andrew Morton

[permalink] [raw]
Subject: Re: Memory management problem with 2.6.0

[email protected] wrote:
>
> see atached file


> mplayer: page allocation failure. order:1, mode:0x21
> Call Trace:
> [<c013a3fc>] __alloc_pages+0x30c/0x350
> [<c013a45f>] __get_free_pages+0x1f/0x50
> [<c036fd5d>] sound_alloc_dmap+0x9d/0x1a0
> [<c0377ec0>] ad_mute+0x20/0x40
> [<c0370116>] open_dmap+0x26/0x100
> [<c0370554>] DMAbuf_open+0x174/0x1a0
> [<c036e0c2>] audio_open+0xc2/0x250
> [<c036d2e4>] sound_open+0xf4/0x120
> [<c036c5b5>] soundcore_open+0x1e5/0x330
> [<c036c3d0>] soundcore_open+0x0/0x330
> [<c015c3e8>] chrdev_open+0xe8/0x210
> [<c0161fdc>] open_namei+0xac/0x3f0
> [<c015c300>] chrdev_open+0x0/0x210
> [<c0152425>] dentry_open+0x145/0x210
> [<c01522d8>] filp_open+0x68/0x70
> [<c015276b>] sys_open+0x5b/0x90
> [<c0109367>] syscall_call+0x7/0xb
>
> Sound error: Couldn't allocate DMA buffer
> esd: page allocation failure. order:4, mode:0x21
> Call Trace:
> [<c013a3fc>] __alloc_pages+0x30c/0x350
> [<c013a45f>] __get_free_pages+0x1f/0x50
> [<c036fd5d>] sound_alloc_dmap+0x9d/0x1a0
> [<c0377ec0>] ad_mute+0x20/0x40
> [<c0370116>] open_dmap+0x26/0x100
> [<c0370554>] DMAbuf_open+0x174/0x1a0
> [<c036e0c2>] audio_open+0xc2/0x250
> [<c036d2e4>] sound_open+0xf4/0x120
> [<c036c5b5>] soundcore_open+0x1e5/0x330
> [<c036c3d0>] soundcore_open+0x0/0x330
> [<c015c3e8>] chrdev_open+0xe8/0x210
> [<c0161fdc>] open_namei+0xac/0x3f0
> [<c015c300>] chrdev_open+0x0/0x210
> [<c0152425>] dentry_open+0x145/0x210
> [<c01522d8>] filp_open+0x68/0x70
> [<c015276b>] sys_open+0x5b/0x90
> [<c0109367>] syscall_call+0x7/0xb

sound_alloc_dmap() is trying to perform a 4-order GFP_ATOMIC allocation.

There is just nothing the MM system can do about that - it is a basic
design problem in that part of the OSS sound system.

I'm not sure what to suggest - development and maintenance of OSS seems to
have come to a stop.

Can you use ALSA instead? If not, increasing /proc/sys/vm/min_free_kbytes
by quite a lot will probably decrease the frequency at which this occurs.