Re: Page allocation issue
Greg KH <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Nov 02, 2007 at 05:28:56PM +0900, Hirofumi Momose wrote: > Hello, > I am totally newbie to this ML. > > I am developping web camera on ARM-9 platform. > It works fine for a while, but finally got following error. > > ------------ Kernel message -------------- > webcam: page allocation failure. order:5, mode:0x0 > [<c002a434>] (dump_stack+0x0/0x14) from [<c006ed70>] (__alloc_pages+0x2b4/0x2c8) > [<c006eabc>] (__alloc_pages+0x0/0x2c8) from [<c002bd78>] (__dma_alloc+0x188/0x3dc) > [<c002bbf0>] (__dma_alloc+0x0/0x3dc) from [<c002c01c>] (dma_alloc_coherent+0x24/0x2c) > [<c002bff8>] (dma_alloc_coherent+0x0/0x2c) from [<c0249350>] (hcd_buffer_alloc+0x8c/0x94) > [<c02492c4>] (hcd_buffer_alloc+0x0/0x94) from [<c02407b8>] (usb_buffer_alloc+0x24/0x30) > r5:c07c2030 r4:c0aff400 > [<c0240794>] (usb_buffer_alloc+0x0/0x30) from [<bf018500>] (uvc_init_video+0x15c/0x3b0 [uvcv > > [<bf0183a4>] (uvc_init_video+0x0/0x3b0 [uvcvideo]) from [<bf0187bc>] (uvc_video_enable+0x68/ > > [<bf018754>] (uvc_video_enable+0x0/0x6c [uvcvideo]) from [<bf0181b8>] (uvc_v4l2_do_ioctl+0xc > > r6:c07c2030 r5:c4185e74 r4:40045612 > [<bf017544>] (uvc_v4l2_do_ioctl+0x0/0xda4 [uvcvideo]) from [<bf00e930>] (video_usercopy+0x21 > > [<bf00e720>] (video_usercopy+0x0/0x33c [videodev]) from [<bf016f20>] (uvc_v4l2_ioctl+0x54/0x > > [<bf016ecc>] (uvc_v4l2_ioctl+0x0/0x64 [uvcvideo]) from [<c009552c>] (do_ioctl+0x68/0x78) > r7:00000003 r6:40045612 r5:000250a4 r4:40045612 > [<c00954c4>] (do_ioctl+0x0/0x78) from [<c009579c>] (vfs_ioctl+0x260/0x288) > r5:000250a4 r4:c279a200 > [<c009553c>] (vfs_ioctl+0x0/0x288) from [<c0095804>] (sys_ioctl+0x40/0x60) > r7:c279a200 r6:40045612 r5:000250a4 r4:00000003 > [<c00957c4>] (sys_ioctl+0x0/0x60) from [<c0025fa0>] (ret_fast_syscall+0x0/0x2c) > r7:00000036 r6:000250a4 r5:00000000 r4:00000000 > Mem-info: > DMA per-cpu: > CPU 0: Hot: hi: 42, btch: 7 usd: 5 Cold: hi: 14, btch: 3 usd: 13 > Active:5931 inactive:22401 dirty:158 writeback:0 unstable:0 > free:1021 slab:1351 mapped:1075 pagetables:70 bounce:0 > DMA free:4084kB min:1440kB low:1800kB high:2160kB active:23724kB inactive:89604kB present:13 > able > > lowmem_reserve[]: 0 0 > DMA: 467*4kB 85*8kB 28*16kB 8*32kB 11*64kB 1*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096k > = 4084kB > Swap cache: add 0, delete 0, find 0/0, race 0+0 > --------------End of Kernel message -------------- > > I think this might be caused by shortage of large pages. > Just after booted, there are several large pages, and camera works fine. > As time passes, large pages are split into many small pages, and camera > fails. How big are the buffers you are trying to allocate? A lot of the video camera drivers are trying to allocate _way_ too big of a buffer for no good reason. Try decreasing the buffer sizes down to 2-3 times the endpoint size, which should fix your problem. thanks, greg k-h ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel