This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

memory alloc fail when "./video_loopback_copy_omapl138.x470MV -r720x576" run!

Other Parts Discussed in Thread: OMAPL138

Hi  

    When I run: "./video_loopback_copy_omapl138.x470MV -r720x576"

    Capture_create Fail, the error message is:

video_loopback_: page allocation failure: order:10, mode:0xd0
Backtrace:
[<c000c580>] (dump_backtrace+0x0/0x114) from [<c03a3528>] (dump_stack+0x18/0x1c)
r7:00000000 r6:0000000a r5:000000d0 r4:00000001
[<c03a3510>] (dump_stack+0x0/0x1c) from [<c0061790>] (warn_alloc_failed+0xf8/0x11c)
[<c0061698>] (warn_alloc_failed+0x0/0x11c) from [<c0061d00>] (__alloc_pages_nodemask+0x54c/0x590)
r3:00000000 r2:00000000
r7:00000040 r6:00000022 r5:000000d0 r4:00000000
[<c00617b4>] (__alloc_pages_nodemask+0x0/0x590) from [<c000e030>] (__dma_alloc+0xec/0x2fc)
[<c000df44>] (__dma_alloc+0x0/0x2fc) from [<c000e2d0>] (dma_alloc_coherent+0x5c/0x68)
[<c000e274>] (dma_alloc_coherent+0x0/0x68) from [<c02a5d7c>] (__videobuf_mmap_mapper+0xac/0x188)
r7:c197e190 r6:c19c7480 r5:c1ae8e18 r4:c19c74e4
[<c02a5cd0>] (__videobuf_mmap_mapper+0x0/0x188) from [<c02a3a54>] (videobuf_mmap_mapper+0xd4/0x114)
r8:b643e000 r7:c19c7700 r6:c1ae8e18 r5:c197e190 r4:c1ae8e18
[<c02a3980>] (videobuf_mmap_mapper+0x0/0x114) from [<c02ae594>] (vpif_mmap+0x40/0x50)
r5:c1ae8e18 r4:c197e000
[<c02ae554>] (vpif_mmap+0x0/0x50) from [<c0296204>] (v4l2_mmap+0x70/0x90)
r5:c1982c00 r4:c19c7700
[<c0296194>] (v4l2_mmap+0x0/0x90) from [<c007a274>] (mmap_region+0x25c/0x494)
r7:c19c7700 r6:000000ff r5:c1ae8e18 r4:00000000
[<c007a018>] (mmap_region+0x0/0x494) from [<c007a770>] (do_mmap_pgoff+0x2c4/0x324)
[<c007a4ac>] (do_mmap_pgoff+0x0/0x324) from [<c007a870>] (sys_mmap_pgoff+0xa0/0xd0)
[<c007a7d0>] (sys_mmap_pgoff+0x0/0xd0) from [<c0009440>] (ret_fast_syscall+0x0/0x2c)
Mem-info:
DMA per-cpu:
CPU 0: hi: 0, btch: 1 usd: 0
active_anon:450 inactive_anon:22 isolated_anon:0
active_file:22 inactive_file:42 isolated_file:0
unevictable:0 dirty:0 writeback:11 unstable:0
free:3845 slab_reclaimable:224 slab_unreclaimable:595
mapped:22 shmem:32 pagetables:51 bounce:0
DMA free:15380kB min:720kB low:900kB high:1080kB active_anon:1800kB inactive_anon:88kB active_file:88kB inactive_file:168kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:32512kB mlocked:0kB dirty:0kB writeback:44kB mapped:88kB shmem:128kB slab_reclaimable:896kB slab_unreclaimable:2380kB kernel_stack:288kB pagetables:204kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:42 all_unreclaimable? no
lowmem_reserve[]: 0 0 0
DMA: 255*4kB 179*8kB 102*16kB 75*32kB 33*64kB 5*128kB 4*256kB 0*512kB 1*1024kB 2*2048kB 0*4096kB = 15380kB
96 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap = 0kB
Total swap = 0kB
8192 pages of RAM
3923 free pages
1406 reserved pages
643 slab pages
96 pages shared
0 pages swap cached
vpif_capture vpif_capture: dma_alloc_coherent size 4149248 failed
Failed to allocate capture driver buffers on /dev/video0
Failed to create capture device

    What's problem about this? I think it caused by CMem config. Right?

    Who can help me to resolved it? And what should I do to reconfig memory map? Is there some example?

    Thanks.

    

  • Hi,

    From the error looks like there isn't suffice memory for the application. This isn't coming from cmem config as from the logs it depicts the buffers are being allocated by the driver, I am sure this doesn't happen every time or does it ?

    try and increase the mem parameter in bootargs, set it to mem=120M, also if you face such issues try and clear the caches by following commands ,

      # sync

     # echo 1 > /proc/sys/vm/drop_caches
    
     # echo 2 > /proc/sys/vm/drop_caches
     # echo 3 > /proc/sys/vm/drop_caches

    Regards,
    --Prabhakar Lad
  • Hi Prabhakar:

        Thanks. I resolved it.

     

  • Hi Changsheng Li,

    Glad to hear, the issue gets resolved.

    Please close this thread, if your query is answered and by performing the action below:

    -------------------------------------------------------------------------------------------------------
    Please click the Verify Answer button on this post if it answers your question.
    -------------------------------------------------------------------------------------------------------

    Thanks & regards,

    Sivaraj K