[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080527094144.1189826a@bike.lwn.net>
Date: Tue, 27 May 2008 09:41:44 -0600
From: Jonathan Corbet <corbet@....net>
To: Mauro Carvalho Chehab <mchehab@...radead.org>
Cc: Alan Cox <alan@...hat.com>, video4linux-list@...hat.com,
linux-kernel@...r.kernel.org, Alan Cox <alan@...rguk.ukuu.org.uk>
Subject: Re: [PATCH] video4linux: Push down the BKL
On Tue, 27 May 2008 10:10:39 -0300
Mauro Carvalho Chehab <mchehab@...radead.org> wrote:
> What if we create 3 functions:
>
> video_ioctl2_bkl()
> video_ioctl2_serialized()
> video_ioctl2_unlocked()
>
> The first patch will point .ioctl_unlock to video_ioctl2_bkl.
>
> A next step would be to move the drivers to use the serialized one.
So we're replacing the big kernel lock with the big v4l2 lock. That
might help the situation, but you'd need to be sure to serialize
against other calls (open(), for example) which are also currently done
under the BKL.
> IMO, we need to create a multi-thread stress userspace tool for
> checking the locks at the ioctls. There are a few testing utils at
> mercurial tree, under v4l2-apps/test. This can be a starting point
> for this tool. Also, Brandon improved one of those tools to work with
> multithread.
I don't think that stress tools are the way to eliminate the BKL.
You'll never find all the problems that way. There's really no way to
avoid the task of actually *looking* at each driver and ensuring that
it has its act together with regard to locking.
jon
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists