From: thomas schorpp <thomas.schorpp@gmail.com>
To: Soby Mathew <soby.linuxtv@gmail.com>, linux-media@vger.kernel.org
Subject: Re: global mutex in dvb_usercopy (dvbdev.c)
Date: Thu, 10 Jan 2013 03:06:51 +0100 [thread overview]
Message-ID: <50EE223B.80204@gmail.com> (raw)
In-Reply-To: <20130109213043.GB7500@zorro.zusammrottung.local>
On 09.01.2013 22:30, Nikolaus Schulz wrote:
> On Tue, Jan 08, 2013 at 12:05:47PM +0530, Soby Mathew wrote:
>> Hi Everyone,
>> I have a doubt regarding about the global mutex lock in
>> dvb_usercopy(drivers/media/dvb-core/dvbdev.c, line 382) .
>>
>>
>> /* call driver */
>> mutex_lock(&dvbdev_mutex);
>> if ((err = func(file, cmd, parg)) == -ENOIOCTLCMD)
>> err = -EINVAL;
>> mutex_unlock(&dvbdev_mutex);
>>
>>
>> Why is this mutex needed? When I check similar functions like
>> video_usercopy, this kind of global locking is not present when func()
>> is called.
>
> I cannot say anything about video_usercopy(), but as it happens, there's
> a patch[1] queued for Linux 3.9 that will hopefully replace the mutex in
> dvb_usercopy() with more fine-grained locking.
>
> Nikolaus
>
> [1] http://git.linuxtv.org/media_tree.git/commit/30ad64b8ac539459f8975aa186421ef3db0bb5cb
"Unfortunately, frontend ioctls can be blocked by the frontend thread for several seconds; this leads to unacceptable lock contention."
Especially the stv0297 signal locking, as it turned out in situations of bad signal input or my cable providers outtage today it has slowed down dvb_ttpci (notable as OSD- output latency and possibly driver buffer overflows of budget source devices) that much that I had to disable tuning with parm --outputonly in vdr-plugin-dvbsddevice.
Can anyone confirm that and have a look at the other frontend drivers for tuners needing as much driver control?
I will try to apply the patch manually to Linux 3.2 and check with Latencytop tomorrow.
y
tom
next prev parent reply other threads:[~2013-01-10 2:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-08 6:35 global mutex in dvb_usercopy (dvbdev.c) Soby Mathew
2013-01-09 21:30 ` Nikolaus Schulz
2013-01-10 2:06 ` thomas schorpp [this message]
2013-01-10 14:25 ` Mauro Carvalho Chehab
2013-01-11 1:26 ` thomas schorpp
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=50EE223B.80204@gmail.com \
--to=thomas.schorpp@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=soby.linuxtv@gmail.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;
as well as URLs for NNTP newsgroup(s).