public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Fluhr <mfluhr@nero.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: 2.6.13 brings buffer underruns when recording DVDs in 16x (was Re: "Read my lips: no more merges" - aka Linux 2.6.14-rc1)
Date: Wed, 14 Sep 2005 10:11:19 +0200	[thread overview]
Message-ID: <1126685479.2010.14.camel@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.58.0509131210090.3351@g5.osdl.org>

[-- Attachment #1: Type: text/plain, Size: 1684 bytes --]

On Tue, 2005-09-13 at 12:11 -0700, Linus Torvalds wrote:
> 
> On Tue, 13 Sep 2005, Mathieu Fluhr wrote:
> > 
> > Okay, here is the point: I will have these bloody buffer underruns
> > unless I select a 'Timer frequency' of 1000 Hz in 'Processor type and
> > features' section of the kernel configuration. That's quite
> > understandable, as recording a DVD at 16x requires a throughput of 22160
> > KB/s, which is quite fast.
> > 
> > I will have a deep look in the patch, and maybe write a patched patch
> > (Ooooo my god what am I writing ?) in the next few days.
> 
> It may just be an application bug too. Too small a buffer, and depending 
> on 2.6.x with a 1kHz timer having timers that run faster...
> 

According to the MMC documentation, you can thoeriticaly send at most
65535 (16 bits int) blocks in one WRITE(10) CDB. This would means
sending a buffer of ~127 MB on case of writing a mode 1 data track (2048
bytes per block)...

Now, practically, it is really not safe to send more than 64 KB per CDB
(Mostly device related). And with such values, you have the following:
 - at 100 Hz  -> 64 KB * 100  = 6400 KB/s  <=> ~4.62x  DVD 
 - at 250 Hz  -> 64 KB * 250  = 16000 KB/s <=> ~11.55x DVD 
 - at 1000 Hz -> 64 KB * 1000 = 64000 KB/s <=> ~46.20x DVD

I would suggest to leave to default value of the timer frequency to 1000
Hz and to add some more comment in the Kconfig.hz file. (Patch attached)

Mathieu

> 		Linus
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

[-- Attachment #2: TimerFrequency.patch --]
[-- Type: text/x-patch, Size: 672 bytes --]

--- linux-2.6.13.1.clean/kernel/Kconfig.hz	2005-09-10 04:42:58.000000000 +0200
+++ linux-2.6.13.1/kernel/Kconfig.hz	2005-09-13 20:32:35.000000000 +0200
@@ -4,7 +4,7 @@
 
 choice
 	prompt "Timer frequency"
-	default HZ_250
+	default HZ_1000
 	help
 	 Allows the configuration of the timer frequency. It is customary
 	 to have the timer interrupt run at 1000 HZ but 100 HZ may be more
@@ -35,6 +35,8 @@
 	help
 	 1000 HZ is the preferred choice for desktop systems and other
 	 systems requiring fast interactive responses to events.
+	 1000 HZ is also required if you want to use large throughput on your
+	 burning devices, like when burning a DVD at 16x.
 
 endchoice
 

  reply	other threads:[~2005-09-14  8:12 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-13  3:34 "Read my lips: no more merges" - aka Linux 2.6.14-rc1 Linus Torvalds
2005-09-13  3:54 ` Alejandro Bonilla Beeche
2005-09-13  3:59   ` Keith Owens
2005-09-13  4:03     ` Alejandro Bonilla Beeche
2005-09-14  5:16     ` Alejandro Bonilla Beeche
2005-09-14 16:28       ` Jeff Garzik
2005-09-14 16:40         ` Alejandro Bonilla
2005-09-14 16:43       ` Linus Torvalds
2005-09-14 16:52         ` Alejandro Bonilla
2005-09-15  0:48       ` Alejandro Bonilla Beeche
2005-09-13 14:27   ` Linus Torvalds
2005-09-13  6:28 ` more fallout from ATI Xpress timer workaround (was: Linux 2.6.14-rc1) Cal Peake
2005-09-13 20:04   ` Jean Delvare
2005-09-13  6:33 ` "Read my lips: no more merges" - aka Linux 2.6.14-rc1 Sonny Rao
2005-09-13  7:04   ` Eric Dumazet
2005-09-15  4:06     ` David S. Miller
2005-09-15  4:22       ` Linus Torvalds
2005-09-15 20:13     ` Benjamin LaHaise
2005-09-15 20:32       ` Linus Torvalds
2005-09-15 21:08         ` Eric Dumazet
2005-09-15 20:41       ` Eric Dumazet
2005-09-13  7:34 ` Udo A. Steinberg
2005-09-13 10:40 ` Mathieu Fluhr
2005-09-13 11:15   ` Helge Hafting
2005-09-13 15:14   ` Linus Torvalds
2005-09-13 17:01   ` Mathieu Fluhr
2005-09-13 17:15     ` Linus Torvalds
2005-09-13 18:12       ` Mathieu Fluhr
2005-09-13 19:11         ` Linus Torvalds
2005-09-14  8:11           ` Mathieu Fluhr [this message]
2005-09-14  8:30             ` 2.6.13 brings buffer underruns when recording DVDs in 16x (was Re: "Read my lips: no more merges" - aka Linux 2.6.14-rc1) Andrew Morton
2005-09-14 10:32               ` Mathieu Fluhr
2005-09-14 10:58                 ` Andrew Morton
2005-09-14 11:12                   ` Alessandro Suardi
2005-09-14 15:04           ` "Read my lips: no more merges" - aka Linux 2.6.14-rc1 Bill Davidsen
2005-09-14 23:38   ` Redeeman
2005-09-13 18:34 ` Roland Dreier
2005-09-13 18:46   ` Linus Torvalds
2005-09-13 21:32     ` Horst von Brand
2005-09-13 19:57 ` Rafael J. Wysocki
2005-09-14 15:31 ` Bill Davidsen
2005-09-14 22:56   ` Matthew Garrett
2005-09-14 17:33 ` Bill Davidsen
2005-09-14 17:45   ` Bill Davidsen
2005-09-14 21:47 ` Henrik Persson
2005-09-14 23:20   ` Jesper Juhl
2005-09-16 19:51     ` Henrik Persson
2005-09-14 22:11 ` 2.6.14-rc1 on ATI hangs when executing _STA and _INI methods Peter Osterlund
2005-09-14 22:27   ` Linus Torvalds
2005-09-14 22:41     ` Peter Osterlund
2005-09-14 23:27 ` "Read my lips: no more merges" - aka Linux 2.6.14-rc1 Redeeman
2005-09-16  7:44 ` Tomasz Torcz

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=1126685479.2010.14.camel@localhost.localdomain \
    --to=mfluhr@nero.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /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