From: corbet@lwn.net (Jonathan Corbet)
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: video4linux-list@redhat.com, linux-kernel@vger.kernel.org,
mchehab@infradead.org
Subject: Re: [PATCH] video4linux: Push down the BKL
Date: Fri, 23 May 2008 07:56:54 -0600 [thread overview]
Message-ID: <9027.1211551014@vena.lwn.net> (raw)
In-Reply-To: Your message of "Thu, 22 May 2008 22:37:00 BST." <20080522223700.2f103a14@core>
> diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c
> [...]
> - .ioctl = video_ioctl2,
> + .unlocked_ioctl = video_ioctl2,
Weird, that was always intended to be that way, I'm not sure what
happened. In any case, consider this part to be
Acked-by: Jonathan Corbet <corbet@lwn.net>
However, in this part:
> diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
> [...]
> + lock_kernel();
> err = __video_do_ioctl(inode, file, cmd, parg);
> + unlock_kernel();
This forces the BKL on all V4L2 drivers whether or not they need it.
Given that this code can, in fact, be a path where latency matters
(consider VIDIOC_DQBUF), I'm not sure that's the best way to do it.
On the other hand, the next level of BKL pushdown would be painful as
all hell, given the massive number of callbacks in the V4L2 API. So I'm
thinking it might be justified to create a video_ioctl2_locked() for
V4L2 drivers which are not yet known to be safe in the absence of the
BKL. The amount of extra code would be quite small, and it would let
safe drivers operate BKL-free.
jon
next prev parent reply other threads:[~2008-05-23 13:57 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-22 21:37 [PATCH] video4linux: Push down the BKL Alan Cox
2008-05-23 2:08 ` Andy Walls
2008-05-23 6:16 ` Hans Verkuil
2008-05-23 6:28 ` Hans Verkuil
2008-05-26 16:39 ` Mauro Carvalho Chehab
2008-05-23 9:09 ` Alan Cox
2008-05-26 16:34 ` Mauro Carvalho Chehab
2008-05-26 16:46 ` Hans Verkuil
2008-05-26 21:14 ` Mauro Carvalho Chehab
2008-05-23 13:56 ` Jonathan Corbet [this message]
2008-05-23 15:39 ` Alan Cox
2008-05-23 16:09 ` Jonathan Corbet
2008-05-23 18:58 ` Alan Cox
2008-05-23 19:05 ` Hans Verkuil
2008-05-25 23:46 ` Mike Isely
2008-05-26 16:59 ` Mauro Carvalho Chehab
2008-05-26 20:23 ` Alan Cox
2008-05-26 21:10 ` Mauro Carvalho Chehab
2008-05-26 22:01 ` Alan Cox
2008-05-27 13:10 ` Mauro Carvalho Chehab
2008-05-27 15:41 ` Jonathan Corbet
2008-05-27 16:31 ` Mauro Carvalho Chehab
2008-05-27 16:37 ` Jonathan Corbet
2008-05-27 18:59 ` Mauro Carvalho Chehab
2008-05-27 19:26 ` Devin Heitmueller
2008-05-27 21:00 ` Mauro Carvalho Chehab
2008-05-27 21:22 ` Devin Heitmueller
2008-05-27 23:48 ` Andy Walls
2008-05-28 0:46 ` Devin Heitmueller
2008-05-28 2:37 ` Andy Walls
2008-05-28 2:47 ` Devin Heitmueller
2008-05-28 8:34 ` Alan Cox
2008-05-28 6:13 ` Hans Verkuil
2008-05-27 19:50 ` Arjan van de Ven
2008-05-27 20:24 ` Mauro Carvalho Chehab
2008-05-27 18:14 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9027.1211551014@vena.lwn.net \
--to=corbet@lwn.net \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=video4linux-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox