lkml.org 
[lkml]   [2008]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] video4linux: Push down the BKL
    On Fri, 23 May 2008 08:16:05 +0200
    Hans Verkuil <hverkuil@xs4all.nl> wrote:

    > On Friday 23 May 2008 04:08:04 Andy Walls wrote:
    > > On Thu, 2008-05-22 at 22:37 +0100, Alan Cox wrote:
    > > > For most drivers the generic ioctl handler does the work and we
    > > > update it and it becomes the unlocked_ioctl method. Older drivers
    > > > use the usercopy method so we make it do the work. Finally there
    > > > are a few special cases.
    > > >
    > > > Signed-off-by: Alan Cox <alan@redhat.com>
    > >
    > > I'd like to start planning out the changes to eliminate the BKL from
    > > cx18.
    > >
    > > Could someone give me a brief education as to what elements of
    > > cx18/ivtv_v4l2_do_ioctl() would be forcing the use of the BKL for
    > > these drivers' ioctls? I'm assuming it's not the
    > > mutex_un/lock(&....->serialize_lock) and that the answer's not in the
    > > diff.
    >
    > To the best of my knowledge there is no need for a BKL in ivtv or cx18.
    > It was just laziness on my part that I hadn't switched to
    > unlocked_ioctl yet.

    I suspect that this is true with almost all drivers. Yet, we may need to enable
    BKL or add other locks on a few places. For example, the old tuner i2c probing
    method relies on a global and unique static var to identify radio and tv
    tuners. I can foresee a race condition there, if you have two boards probing
    tuners at the same time.

    Of course, we need to do several tests, since probably there are some issues
    that we cannot foresee.

    Cheers,
    Mauro


    \
     
     \ /
      Last update: 2008-05-26 18:41    [W:4.241 / U:0.680 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site