Re: [PATCH] video4linux: Push down the BKL

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Alan Cox <alan@...>
Cc: <video4linux-list@...>, <linux-kernel@...>, Alan Cox <alan@...>
Date: Tuesday, May 27, 2008 - 9:10 am

On Mon, 26 May 2008 18:01:54 -0400
Alan Cox <alan@redhat.com> wrote:


Agreed.


Hmm... it maybe an interesting interim solution to create such function, and
moving the drivers to it.

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. I suspect
that this will work properly on all devices that are using video_ioctl2, if
the videobuf locks are now 100% ok. So, it is just a matter of doing some stress
tests. We may start with vivi, since we have a complete domain on what this
driver is doing (e.g. no hardware surprises).

After having all those drivers using the _serialized() one, we can remove the bkl.

Then, we can focus on properly fixing the locks inside the drivers, and moving
one by one to video_ioctl2_unlocked.

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.

What do you think?

Cheers,
Mauro
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] video4linux: Push down the BKL, Alan Cox, (Thu May 22, 5:37 pm)
Re: [PATCH] video4linux: Push down the BKL, Mauro Carvalho Chehab, (Mon May 26, 12:59 pm)
Re: [PATCH] video4linux: Push down the BKL, Alan Cox, (Mon May 26, 4:23 pm)
Re: [PATCH] video4linux: Push down the BKL, Mauro Carvalho Chehab, (Mon May 26, 5:10 pm)
Re: [PATCH] video4linux: Push down the BKL, Alan Cox, (Mon May 26, 6:01 pm)
Re: [PATCH] video4linux: Push down the BKL, Mauro Carvalho Chehab, (Tue May 27, 9:10 am)
Re: [PATCH] video4linux: Push down the BKL, Jonathan Corbet, (Tue May 27, 11:41 am)
Re: [PATCH] video4linux: Push down the BKL, Mauro Carvalho Chehab, (Tue May 27, 12:31 pm)
Re: [PATCH] video4linux: Push down the BKL, Alan Cox, (Tue May 27, 2:14 pm)
Re: [PATCH] video4linux: Push down the BKL, Jonathan Corbet, (Tue May 27, 12:37 pm)
Re: [PATCH] video4linux: Push down the BKL, Mauro Carvalho Chehab, (Tue May 27, 2:59 pm)
Re: [PATCH] video4linux: Push down the BKL, Arjan van de Ven, (Tue May 27, 3:50 pm)
Re: [PATCH] video4linux: Push down the BKL, Mauro Carvalho Chehab, (Tue May 27, 4:24 pm)
Re: [PATCH] video4linux: Push down the BKL, Devin Heitmueller, (Tue May 27, 3:26 pm)
Re: [PATCH] video4linux: Push down the BKL, Mauro Carvalho Chehab, (Tue May 27, 5:00 pm)
Re: [PATCH] video4linux: Push down the BKL, Andy Walls, (Tue May 27, 7:48 pm)
Re: [PATCH] video4linux: Push down the BKL, Devin Heitmueller, (Tue May 27, 8:46 pm)
Re: [PATCH] video4linux: Push down the BKL, Hans Verkuil, (Wed May 28, 2:13 am)
Re: [PATCH] video4linux: Push down the BKL, Andy Walls, (Tue May 27, 10:37 pm)
Re: [PATCH] video4linux: Push down the BKL, Alan Cox, (Wed May 28, 4:34 am)
Re: [PATCH] video4linux: Push down the BKL, Devin Heitmueller, (Tue May 27, 10:47 pm)
Re: [PATCH] video4linux: Push down the BKL, Devin Heitmueller, (Tue May 27, 5:22 pm)
Re: [PATCH] video4linux: Push down the BKL, Mike Isely, (Sun May 25, 7:46 pm)
Re: [PATCH] video4linux: Push down the BKL, Hans Verkuil, (Fri May 23, 3:05 pm)
Re: [PATCH] video4linux: Push down the BKL , Jonathan Corbet, (Fri May 23, 9:56 am)
Re: [PATCH] video4linux: Push down the BKL, Alan Cox, (Fri May 23, 11:39 am)
Re: [PATCH] video4linux: Push down the BKL , Jonathan Corbet, (Fri May 23, 12:09 pm)
Re: [PATCH] video4linux: Push down the BKL, Alan Cox, (Fri May 23, 2:58 pm)
Re: [PATCH] video4linux: Push down the BKL, Andy Walls, (Thu May 22, 10:08 pm)
Re: [PATCH] video4linux: Push down the BKL, Alan Cox, (Fri May 23, 5:09 am)
Re: [PATCH] video4linux: Push down the BKL, Mauro Carvalho Chehab, (Mon May 26, 12:34 pm)
Re: [PATCH] video4linux: Push down the BKL, Hans Verkuil, (Mon May 26, 12:46 pm)
Re: [PATCH] video4linux: Push down the BKL, Mauro Carvalho Chehab, (Mon May 26, 5:14 pm)
Re: [PATCH] video4linux: Push down the BKL, Hans Verkuil, (Fri May 23, 2:16 am)
Re: [PATCH] video4linux: Push down the BKL, Mauro Carvalho Chehab, (Mon May 26, 12:39 pm)
Re: [PATCH] video4linux: Push down the BKL, Hans Verkuil, (Fri May 23, 2:28 am)