lkml.org 
[lkml]   [2008]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] video4linux: Push down the BKL
From
Date
> 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


\
 
 \ /
  Last update: 2008-05-23 15:59    [W:0.299 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site