We have developed soc camera based driver for OV4689 on jetson tk1 board using L4T 21.4. We are able to capture images (of 4MB size) from sensor at 90FPS. But when we try to copy image data from mmap buffer, it takes 17ms time to copy around 4MB of data.
How to improve memcpy performance of mmap buffer ?
vsw
July 3, 2016, 8:20pm
2
hi vsw,
thanks for reply.
in my case memcpy performance reduces with mmap buffer only.
if i allocate buffer in user space and try to copy 4MB data from that then it takes around 3ms.
so issue seems to be with mmap buffer only. memcpy operation takes more time if source buffer is mmaped buffer.
vsw
July 4, 2016, 7:52pm
4
I am using v4l2 with mmap memory too. My problem comes from there.
I made test again:
memcpy from userspace pointer to userspace pointer is about 33ms per 26mb
memcpy from userspace pointer to pinned pointer is about 33ms per 26mb
memcpy from mmap v4l pointer to pinned is about 200ms per 26mb
So mmap is slow?!
vsw
July 5, 2016, 9:04pm
5
i used memalign in my application and user pointer started working but somehow data copy from
buf.m.userptr fails. see below code snippet
ioctl (fd_v4l, VIDIOC_DQBUF, &buf)
memcpy(test_buff, buf.m.userptr, buf.length);
if ( memcmp( test_buff, buf.m.userptr, buf.length) )
{
printf("error in memcpy);
}
memcmp fails.