Re: How to use V4L2 dmafd with sendfile?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Step 0: Define "really fast". (I work with boxes that have LACP bonds of
> 2x40gbit ethernet interfaces - your v4l2 device is probably the slow link at
> that point, and sendfile won't matter).
 
Yes, I previously checked the performance boost. It is a 100MBit/s Ethernet connection on an armv7.
- send ~70MBit/s, 50% CPU usage, the bottleneck is in tcp_sendmsg -> __copy_from_user
- sendfile ~90MBit/s, but almost 0% CPU Usage -> uses the dma engine
 
That's why I want to use sendfile. I need a mechanism to put the memory buffer into a filedescriptor, sendfile can handle.
v4l2's ioctl VIDIOC_EXPBUF exports a dmafd, which is not suitable. sendfile returns with error -29, which is ESPIPE. Looking into sendfile's kernel source the if conndition !(in.file->f_mode & FMODE_PREAD) causes these error, because FMODE_PREAD is not set in the dmafd. How to make the dmafd suitable?
 
http://elixir.free-electrons.com/linux/v4.0/source/fs/read_write.c#L1276
 
 
 
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux