* Unable to write V4L2 capture buffers to O_DIRECT file
@ 2016-02-27 9:48 David Müller
0 siblings, 0 replies; only message in thread
From: David Müller @ 2016-02-27 9:48 UTC (permalink / raw)
To: Linux Media
Hello
I'm trying to store data received from a V4L2 capture device to a SATA
storage device.
For performance reasons, i would like to do the writing using a file
opened with the O_DIRECT flag.
As a test, I have modified the v4lcap example code to support writing
output files directly (-F option) and to select IO mode (-B option).
Running this code results in a -EFAULT error returned by the write()
function used to write to the output file as shown below:
/ # v4lcap -c 2 -o -F /dev/sda1 -Bd
IO: O_DIRECT mode
error writing file: Bad address
buf: 0x76ac8000, size: 0x2DC800
.error writing file: Bad address
buf: 0x767eb000, size: 0x2DC800
Without "O_DIRECT", the v4lcap tool works ok but the overall performance
is pretty bad.
/ # v4lcap -c 2 -o -F /dev/sda1 -Bb
IO: normal mode
..
Any ideas/hints how to fix this?
HW: i.MX6Q based custom board
SW: kernel 4.2.0 + some patches (mainly CSI capture related)
Dave
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-02-27 9:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-27 9:48 Unable to write V4L2 capture buffers to O_DIRECT file David Müller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox