Hi Linux1394-user list
I would really appreciate some ideas here:
I am trying to allocate a largish DMA buffer via libdc1384 to capture
frames from a camera. My thinking is that if I first fill an entire
buffer of about 200 frames (307200 bytes each) before I start dumping
them to disk, then I should be able to avoid the IObus bottleneck and
achieve near 400 Mb/s frame transfer bandwidth. (Actually I want to
run two cameras, each capturing 100 mono VGA frames at 80 fps.)
In theory, I should be able to ask video1394 via a call to
ioctl(video1394_fd, VIDEO1394_IOC_LISTEN_CHANNEL, etc) to allocate up
to VIDEO1394_MAX_SIZE bytes which comes to 0x4000000 or about 67 MB.
In practice, I get a segmentation fault when I ask for more than 86 x
307200 = 26.4 MB (approximately, because the buffer size gets adjusted
to page boundaries somewhere). This number does not change when I reboot.
Here is the relevant part of /var/log/messages:
mask: 0000000000000001 usage: 0000000000000000
dma_region_alloc: kmalloc(sglist) failed
video1394_0: Failed to allocate dma buffer
Unable to handle kernel NULL pointer dereference at virtual address
00000004
printing eip:
f8a54116
*pde = 2bff5067
*pte = 00000000
Oops: 0002
i810_audio ac97_codec soundcore ftdi_sio usbserial video1394 raw1394
parport_pc l
p parport autofs nfs lockd sunrpc 3c59x e100 floppy sg sr_mod
microcode ide-s
CPU: 0
EIP: 0060:[<f8a54116>] Not tainted
EFLAGS: 00010246
EIP is at free_dma_iso_ctx [video1394] 0xb6 (2.4.22-1.2115.nptl)
eax: 00000000 ebx: f714b9d4 ecx: f714ba24 edx: 00000000
esi: f714b980 edi: c1cc3cdc ebp: c1cc3cdc esp: f3887e7c
ds: 0068 es: 0068 ss: 0068
Process cammonitor (pid: 5592, stackpage=f3887000)
Stack: f714b9d4 00000000 00000000 f714b9d4 f714b980 f8a54398 f714b980
00000000
f7ff9800 00000000 0000000a 00000400 f8a5677f f3887ee8 f6886000
f3886000
c01a1e4d c1cc3cdc 00000000 c1cc3cdc 00000000 f8a55080 c1cc3cdc
00000001
Call Trace: [<f8a54398>] alloc_dma_iso_ctx [video1394] 0x1f8
(0xf3887e90)
[<f8a5677f>] .rodata.str1.32 [video1394] 0x3bf (0xf3887eac)
[<c01a1e4d>] tty_default_put_char [kernel] 0x2d (0xf3887ebc)
[<f8a55080>] video1394_ioctl [video1394] 0x1f0 (0xf3887ed0)
[<c01a3ef1>] write_chan [kernel] 0x161 (0xf3887ef8)
[<c01a24db>] do_tty_write [kernel] 0xdb (0xf3887f44)
[<c0202310>] hot_generate_error [kernel] 0x60 (0xf3887f88)
[<c01550a9>] sys_ioctl [kernel] 0xc9 (0xf3887f94)
[<c0202310>] hot_generate_error [kernel] 0x60 (0xf3887fa0)
[<c01447da>] sys_open [kernel] 0x8a (0xf3887fa8)
[<c0109b9f>] system_call [kernel] 0x33 (0xf3887fc0)
[<c0202310>] hot_generate_error [kernel] 0x60 (0xf3887fc8)
Code: 89 50 04 89 02 31 c0 89 86 a4 00 00 00 c7 41 04 00 00 00 00
My OS is Red Hat Fedora Core 1 which has kernel version
2.4.22-1.2115.nptl. I use a recent (Feb 2004) libdc1394 CVS.
Matching up the kernel error messages above with the code in
video1394.c, it seems it got as far as the "Failed to allocate dma
buffer" message before the kernel oops stepped in. Otherwise there
would have been further messages from video1394 itself about being
unable to establish ir context.
Anyone come across this one before?
Thanks,
Johann
-- ^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^ Johann Schoonees Imaging & Sensing Team Industrial Research Limited, PO Box 2225, Auckland, New Zealand Phone +64 9 9203679 Fax +64 9 3028106 http://www.is.irl.cri.nz/ ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ mailing list Linux1394-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux1394-userReceived on Wed Feb 11 05:45:05 2004
This archive was generated by hypermail 2.1.8 : Mon 02 May 2005 - 09:16:46 CEST