Re: [V4L] races in v4l read + write in 2.4

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



Oliver Neukum wrote:
> 
> > Rather make this per open than per device.  As is, it will really hurt
> > performance with multiple capturing opens (or doesn't v4l1 allow
> > this?).  Can't the driver implement it's own semaphore if it needs it?
> 
> Multiple opens are impossible under v4l.
> However multithreaded tasks could do concurrent reads or writes.
> This is not intended I think, thus the semaphores.
> It's hard to see how the hardware could do several reads at the same time.
> Thus v4l can do this for the drivers. This is a race that hits 2/3 of the usb
> video devices.
> 
>         Regards
>                 Oliver

I can see the problem, but I personally think that this should be
handled by the driver itself.  If the driver can handle simultaneous
(for example, separate even/odd fileds) reads, let it, otherwise let it
serialise the operations itself.

As usual, this is just IMHO, but I think the idea of videodev.c was to
be a pretty lightweight wrapper, with the driver doing all the real
work.

-justin





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux