8devices / carambola2

Carambola 2 - an AR9331/SoC based PCB
GNU General Public License v2.0
55 stars 43 forks source link

CIFS transfer (cache) problem #26

Closed gantor2000 closed 10 years ago

gantor2000 commented 10 years ago

I'm using a carambola2 module with GPhoto 2.5.3.1 for tethered shooting with a Canon EOS 350D and a Canon EOS 5D Mark III on a samba share via Wifi With the old 350D everything works fine, but if i connect the 5D Mark III i get a "page allocation failure"

[   26.120000] br-lan: port 2(wlan0) entered forwarding state
[   43.250000] usb 1-1: new high-speed USB device number 2 using ehci-platform
[  202.170000] usb 1-1: USB disconnect, device number 2
[  202.460000] usb 1-1: new high-speed USB device number 3 using ehci-platform
[  202.620000] hub 1-0:1.0: unable to enumerate USB device on port 1
[  202.840000] hub 1-0:1.0: unable to enumerate USB device on port 1
[  203.120000] usb 1-1: new high-speed USB device number 5 using ehci-platform
[  203.680000] usb 1-1: USB disconnect, device number 5
[  309.460000] usb 1-1: new high-speed USB device number 6 using ehci-platform
[  338.260000] ieee80211 phy0: failed to reallocate TX buffer
[  339.230000] flush-cifs-2: page allocation failure: order:0, mode:0x20
[  339.230000] Call Trace:[<80070074>] 0x80070074
[  339.230000] [<80070074>] 0x80070074
[  339.230000] [<800b94c4>] 0x800b94c4

...

[  339.230000] [<80093148>] 0x80093148
[  339.230000] [<8006dae8>] 0x8006dae8
[  339.230000]
[  339.230000] Mem-Info:
[  339.230000] Normal per-cpu:
[  339.230000] CPU    0: hi:   18, btch:   3 usd:   0
[  339.230000] active_anon:8051 inactive_anon:14 isolated_anon:0
[  339.230000]  active_file:1198 inactive_file:2924 isolated_file:32
[  339.230000]  unevictable:0 dirty:2843 writeback:113 unstable:0
[  339.230000]  free:73 slab_reclaimable:264 slab_unreclaimable:1272
[  339.230000]  mapped:647 shmem:21 pagetables:83 bounce:0
[  339.230000]  free_cma:0
[  339.230000] Normal free:292kB min:1016kB low:1268kB high:1524kB active_anon:32204kB inactive_anon:56kB active_file:4792kB inactive_file:11696kB unevictable:0kB isolated(anon):0kB isolated(file):128kB present:65024kB mlocked:0kB dirty:11372kB writeback:452kB mapped:2588kB shmem:84kB slab_reclaimable:1056kB slab_unreclaimable:5088kB kernel_stack:400kB pagetables:332kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:980 all_unreclaimable? no
[  339.230000] lowmem_reserve[]: 0 0
[  339.230000] Normal: 1*4kB 0*8kB 0*16kB 1*32kB 0*64kB 0*128kB 1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 292kB
[  339.230000] 4175 total pagecache pages
[  339.230000] 0 pages in swap cache
[  339.230000] Swap cache stats: add 0, delete 0, find 0/0
[  339.230000] Free swap  = 0kB
[  339.230000] Total swap = 0kB
[  339.230000] 16384 pages RAM
[  339.230000] 1046 pages reserved
[  339.230000] 4628 pages shared
[  339.230000] 13899 pages non-shared
[  339.630000] ath: skbuff alloc of size 1974 failed
[  339.630000] flush-cifs-2: page allocation failure: order:0, mode:0x20
[  339.630000] Call Trace:[<80070074>] 0x80070074
[  339.630000] [<80070074>] 0x80070074
[  339.630000] [<800b94c4>] 0x800b94c4

...

[  339.630000] [<80093148>] 0x80093148
[  339.630000] [<8006dae8>] 0x8006dae8
[  339.630000]
[  339.630000] Mem-Info:
[  339.630000] Normal per-cpu:
[  339.630000] CPU    0: hi:   18, btch:   3 usd:   0
[  339.630000] active_anon:8051 inactive_anon:14 isolated_anon:0
[  339.630000]  active_file:1198 inactive_file:2924 isolated_file:32
[  339.630000]  unevictable:0 dirty:2843 writeback:113 unstable:0
[  339.630000]  free:73 slab_reclaimable:264 slab_unreclaimable:1272
[  339.630000]  mapped:647 shmem:21 pagetables:83 bounce:0
[  339.630000]  free_cma:0
[  339.630000] Normal free:292kB min:1016kB low:1268kB high:1524kB active_anon:32204kB inactive_anon:56kB active_file:4792kB inactive_file:11696kB unevictable:0kB isolated(anon):0kB isolated(file):128kB present:65024kB mlocked:0kB dirty:11372kB writeback:452kB mapped:2588kB shmem:84kB slab_reclaimable:1056kB slab_unreclaimable:5088kB kernel_stack:400kB pagetables:332kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:980 all_unreclaimable? no
[  339.630000] lowmem_reserve[]: 0 0
[  339.630000] Normal: 1*4kB 0*8kB 0*16kB 1*32kB 0*64kB 0*128kB 1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 292kB
[  339.630000] 4175 total pagecache pages
[  339.630000] 0 pages in swap cache
[  339.630000] Swap cache stats: add 0, delete 0, find 0/0
[  339.630000] Free swap  = 0kB
[  339.630000] Total swap = 0kB
[  339.630000] 16384 pages RAM
[  339.630000] 1046 pages reserved
[  339.630000] 4628 pages shared
[  339.630000] 13899 pages non-shared
[  340.020000] ath: skbuff alloc of size 1974 failed
[  340.030000] flush-cifs-2: page allocation failure: order:0, mode:0x20
[  340.030000] Call Trace:[<80070074>] 0x80070074
[  340.030000] [<80070074>] 0x80070074
[  340.030000] [<800b94c4>] 0x800b94c4

...

[  364.210000] [<8006dae8>] 0x8006dae8
[  364.210000]
[  364.210000] Mem-Info:
[  364.210000] Normal per-cpu:
[  364.210000] CPU    0: hi:   18, btch:   3 usd:   0
[  364.210000] active_anon:8051 inactive_anon:14 isolated_anon:0
[  364.210000]  active_file:1198 inactive_file:2924 isolated_file:32
[  364.210000]  unevictable:0 dirty:2843 writeback:113 unstable:0
[  364.210000]  free:0 slab_reclaimable:264 slab_unreclaimable:1345
[  364.210000]  mapped:647 shmem:21 pagetables:83 bounce:0
[  364.210000]  free_cma:0
[  364.210000] Normal free:0kB min:1016kB low:1268kB high:1524kB active_anon:32204kB inactive_anon:56kB active_file:4792kB inactive_file:11696kB unevictable:0kB isolated(anon):0kB isolated(file):128kB present:65024kB mlocked:0kB dirty:11372kB writeback:452kB mapped:2588kB shmem:84kB slab_reclaimable:1056kB slab_unreclaimable:5380kB kernel_stack:400kB pagetables:332kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:598699 all_unreclaimable? no
[  364.210000] lowmem_reserve[]: 0 0
[  364.210000] Normal: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 0kB
[  364.210000] 4175 total pagecache pages
[  364.210000] 0 pages in swap cache
[  364.210000] Swap cache stats: add 0, delete 0, find 0/0
[  364.210000] Free swap  = 0kB
[  364.210000] Total swap = 0kB
[  364.210000] 16384 pages RAM
[  364.210000] 1046 pages reserved
[  364.210000] 4620 pages shared
[  364.210000] 13972 pages non-shared
[  364.630000] ath: skbuff alloc of size 1974 failed
[  364.640000] ath: skbuff alloc of size 1974 failed
[  364.640000] ath: skbuff alloc of size 1974 failed
[  364.650000] ath: skbuff alloc of size 1974 failed
[  364.650000] ath: skbuff alloc of size 1974 failed
[  364.650000] ath: skbuff alloc of size 1974 failed
[  364.660000] ath: skbuff alloc of size 1974 failed
[  364.660000] ath: skbuff alloc of size 1974 failed
[  364.670000] ath: skbuff alloc of size 1974 failed
[  364.670000] ath: skbuff alloc of size 1974 failed
[  364.680000] ath: skbuff alloc of size 1974 failed
[  364.680000] ath: skbuff alloc of size 1974 failed
[  364.690000] ath: skbuff alloc of size 1974 failed
[  364.690000] ath: skbuff alloc of size 1974 failed
[  364.700000] ath: skbuff alloc of size 1974 failed
[  364.700000] ath: skbuff alloc of size 1974 failed
[  364.710000] ath: skbuff alloc of size 1974 failed
[  364.710000] ath: skbuff alloc of size 1974 failed
[  364.720000] ath: skbuff alloc of size 1974 failed
[  364.720000] ath: skbuff alloc of size 1974 failed
[  364.720000] ath: skbuff alloc of size 1974 failed
[  364.730000] ath: skbuff alloc of size 1974 failed
[  364.730000] ath: skbuff alloc of size 1974 failed
[  364.740000] ath: skbuff alloc of size 1974 failed
[  364.740000] ath: skbuff alloc of size 1974 failed
[  364.750000] ath: skbuff alloc of size 1974 failed
[  364.750000] ath: skbuff alloc of size 1974 failed
[  364.760000] ath: skbuff alloc of size 1974 failed
[  364.760000] ath: skbuff alloc of size 1974 failed
[  364.770000] ath: skbuff alloc of size 1974 failed
[  364.770000] ath: skbuff alloc of size 1974 failed
[  364.780000] ath: skbuff alloc of size 1974 failed
[  364.780000] ath: skbuff alloc of size 1974 failed
[  364.790000] ath: skbuff alloc of size 1974 failed
[  364.830000] ath: skbuff alloc of size 1974 failed
[  364.940000] __slab_alloc: 395 callbacks suppressed
[  364.940000] SLUB: Unable to allocate memory on node -1 (gfp=0x8020)
[  364.940000]   cache: kmalloc-128, object size: 128, buffer size: 128, default order: 0, min order: 0
[  364.940000]   node 0: slabs: 0, objs: 0, free: 0
[  364.960000] ath: skbuff alloc of size 1974 failed
[  364.960000] SLUB: Unable to allocate memory on node -1 (gfp=0x8020)
[  364.960000]   cache: kmalloc-128, object size: 128, buffer size: 128, default order: 0, min order: 0
[  364.960000]   node 0: slabs: 0, objs: 0, free: 0
[  364.990000] SLUB: Unable to allocate memory on node -1 (gfp=0x8020)
[  364.990000]   cache: kmalloc-128, object size: 128, buffer size: 128, default order: 0, min order: 0
[  364.990000]   node 0: slabs: 0, objs: 0, free: 0
[  365.010000] SLUB: Unable to allocate memory on node -1 (gfp=0x8020)
[  365.010000]   cache: kmalloc-128, object size: 128, buffer size: 128, default order: 0, min order: 0
[  365.010000]   node 0: slabs: 0, objs: 0, free: 0
[  365.030000] SLUB: Unable to allocate memory on node -1 (gfp=0x8020)
[  365.030000]   cache: kmalloc-128, object size: 128, buffer size: 128, default order: 0, min order: 0
[  365.030000]   node 0: slabs: 0, objs: 0, free: 0
[  365.040000] ath: skbuff alloc of size 1974 failed
[  365.050000] SLUB: Unable to allocate memory on node -1 (gfp=0x8020)
[  365.050000]   cache: kmalloc-128, object size: 128, buffer size: 128, default order: 0, min order: 0
[  365.050000]   node 0: slabs: 0, objs: 0, free: 0
[  365.070000] SLUB: Unable to allocate memory on node -1 (gfp=0x8020)
[  365.070000]   cache: kmalloc-128, object size: 128, buffer size: 128, default order: 0, min order: 0
[  365.070000]   node 0: slabs: 0, objs: 0, free: 0
[  365.090000] SLUB: Unable to allocate memory on node -1 (gfp=0x8020)
[  365.090000]   cache: kmalloc-128, object size: 128, buffer size: 128, default order: 0, min order: 0
[  365.090000]   node 0: slabs: 0, objs: 0, free: 0
[  365.110000] SLUB: Unable to allocate memory on node -1 (gfp=0x8020)
[  365.110000]   cache: kmalloc-128, object size: 128, buffer size: 128, default order: 0, min order: 0
[  365.110000]   node 0: slabs: 0, objs: 0, free: 0
[  365.130000] SLUB: Unable to allocate memory on node -1 (gfp=0x8020)
[  365.130000]   cache: kmalloc-128, object size: 128, buffer size: 128, default order: 0, min order: 0
[  365.130000]   node 0: slabs: 0, objs: 0, free: 0
[  365.150000] ath: skbuff alloc of size 1974 failed
[  365.240000] ath: skbuff alloc of size 1974 failed
[  365.350000] ath: skbuff alloc of size 1974 failed
[  365.450000] ath: skbuff alloc of size 1974 failed
[  365.550000] ath: skbuff alloc of size 1974 failed
[  365.650000] ath: skbuff alloc of size 1974 failed
[  365.760000] ath: skbuff alloc of size 1974 failed
[  365.850000] warn_alloc_failed: 743 callbacks suppressed
[  365.850000] khubd: page allocation failure: order:0, mode:0x200020
[  365.850000] Call Trace:[<80070074>] 0x80070074
[  365.850000] [<80070074>] 0x80070074
[  365.850000] [<800b94c4>] 0x800b94c4
mantas-p commented 10 years ago

Hi, Looks like carambola runs out of memory. Can you show output of 'free' command when using with 350D? Probably not much free memory is left even then. I suggest to disable non-essential services, and software to free more memory.

gantor2000 commented 10 years ago

Yes - that's it.

I'm starting with

             total         used         free       shared      buffers
Mem:         61352        19964        41388            0         2300
-/+ buffers:              17664        43688
Swap:            0            0            0

During tethered shooting with the 350D the carambola2 is nearly out of memory

             total         used         free       shared      buffers
Mem:         61352        53360         7992            0         2532
-/+ buffers:              50828        10524
Swap:            0            0            0

and even after the gphoto2 command has stopped the memory is not really freed

             total         used         free       shared      buffers
Mem:         61352        49576        11776            0         2532
-/+ buffers:              47044        14308
Swap:            0            0            0

after unmounting the CIFS share the memory is "back in town"

             total         used         free       shared      buffers
Mem:         61352        17264        44088            0         1136
-/+ buffers:              16128        45224
Swap:            0            0            0
gantor2000 commented 10 years ago

I will try to stream the data (photo) direkt from libgphoto2 to a FTP/SFTP server to save memory.