linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* future of -rt kernels for realtime audio
@ 2010-07-06 11:19 Pedro Ribeiro
  2010-07-06 11:49 ` Robin Gareus
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Pedro Ribeiro @ 2010-07-06 11:19 UTC (permalink / raw)
  To: linux-rt-users

Hi,

I've been using -rt kernels since 2.6.29 because I do realtime audio
on my laptop.

The audio stability has been steadily improving since, and now I find
that I can use 2.6.34 without the -rt patch and achieve the same
stability as 2.6.33-rt - well, my latency requirements aren't that
high, I just need to maintain 8.9ms completely stable, however before
.34 it would be impossible without the -rt patch.

So out of curiosity, what changed for .34? According to [1], on .33
Raw Spinlock Annotation was introduced in the mainline kernel.
However, as said above, I can't get the same performance than with
.34.

I remember that I read somewhere that the one the biggest problems
with latency requirements was the use of the BKL. Do you think there
will be a significant improvement of latency (in specific cases of
course) with the scheduled removal of BKL for 2.6.36?

Thanks for the help,
Pedro

[1] http://www.osadl.org/Realtime-Linux.projects-realtime-linux.0.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: future of -rt kernels for realtime audio
  2010-07-06 11:19 future of -rt kernels for realtime audio Pedro Ribeiro
@ 2010-07-06 11:49 ` Robin Gareus
  2010-07-06 15:45 ` Mark Knecht
  2010-07-06 19:53 ` Philipp Überbacher
  2 siblings, 0 replies; 5+ messages in thread
From: Robin Gareus @ 2010-07-06 11:49 UTC (permalink / raw)
  To: Pedro Ribeiro; +Cc: linux-rt-users

On 07/06/2010 01:19 PM, Pedro Ribeiro wrote:
> Hi,
> 
> I've been using -rt kernels since 2.6.29 because I do realtime audio
> on my laptop.
> 
> The audio stability has been steadily improving since, and now I find
> that I can use 2.6.34 without the -rt patch and achieve the same
> stability as 2.6.33-rt - well, my latency requirements aren't that
> high, I just need to maintain 8.9ms completely stable, however before
> .34 it would be impossible without the -rt patch.

It's been possible to achieve low-latency for audio (using JACK) with
the vanilla kernel for a while now.
The -rt patch still has two major advantages:
 - it guarantees low latency.
   (pretty much a requirement for live-performance on stage)
 - it allows to assign scheduling priorities to IRQ handlers.
   (comes in handy for crappy machines that share the soundcard's IRQ)

As for your questions: I don't know the details, hopefully someone else
here can enlighten us. I'd be interested in that as well.

> So out of curiosity, what changed for .34? According to [1], on .33
> Raw Spinlock Annotation was introduced in the mainline kernel.
> However, as said above, I can't get the same performance than with
> .34.
> 
> I remember that I read somewhere that the one the biggest problems
> with latency requirements was the use of the BKL. Do you think there
> will be a significant improvement of latency (in specific cases of
> course) with the scheduled removal of BKL for 2.6.36?
> 
> Thanks for the help,
> Pedro
> 
> [1] http://www.osadl.org/Realtime-Linux.projects-realtime-linux.0.html

-- 
Robin Gareus                           mail: robin@gareus.org
site: http://gareus.org/               chat: xmpp:rgareus@ik.nu
blog: http://rg42.org/                 lab : http://citu.fr/

Public Key at http://pgp.mit.edu/
Fingerprint : 7107 840B 4DC9 C948 076D 6359 7955 24F1 4F95 2B42

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: future of -rt kernels for realtime audio
  2010-07-06 11:19 future of -rt kernels for realtime audio Pedro Ribeiro
  2010-07-06 11:49 ` Robin Gareus
@ 2010-07-06 15:45 ` Mark Knecht
  2010-07-06 19:53 ` Philipp Überbacher
  2 siblings, 0 replies; 5+ messages in thread
From: Mark Knecht @ 2010-07-06 15:45 UTC (permalink / raw)
  To: Pedro Ribeiro; +Cc: linux-rt-users

On Tue, Jul 6, 2010 at 4:19 AM, Pedro Ribeiro <pedrib@gmail.com> wrote:
> Hi,
>
> I've been using -rt kernels since 2.6.29 because I do realtime audio
> on my laptop.
>
> The audio stability has been steadily improving since, and now I find
> that I can use 2.6.34 without the -rt patch and achieve the same
> stability as 2.6.33-rt - well, my latency requirements aren't that
> high, I just need to maintain 8.9ms completely stable, however before
> .34 it would be impossible without the -rt patch.
>
> So out of curiosity, what changed for .34? According to [1], on .33
> Raw Spinlock Annotation was introduced in the mainline kernel.
> However, as said above, I can't get the same performance than with
> .34.
>
> I remember that I read somewhere that the one the biggest problems
> with latency requirements was the use of the BKL. Do you think there
> will be a significant improvement of latency (in specific cases of
> course) with the scheduled removal of BKL for 2.6.36?
>
> Thanks for the help,
> Pedro
>
> [1] http://www.osadl.org/Realtime-Linux.projects-realtime-linux.0.html

With my HDSP 9652 and a good quality desktop machine I've been able to
achieve <2mS latency for over a couple of years with the standard
kernel, but only under controlled setups. If I'm just doing audio and
I run nothing else, doing my best to ensure the machine won't jump
into some cron job that uses a lot of disk access, etc., then the main
line kernel works fine and has for me for quite a long time.

In my experience the value of rt-sources is that I don't have to be as
careful. I can open a broswer, do a little email, etc., or even build
some code and still not get xruns. I cannot do that today with the
main line kernel.

So, I think it's not that the basic Linux kernel cannot do the job
because it can. I suggest it's more about how much extra protection do
you want or need? If you've got a machine that's fully dedicated to
audio then possibly you could get away with it. If you are using this
machine for additional tasks then being able to control real-time
priorities will like win out every time.

Cheers,
Mark

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: future of -rt kernels for realtime audio
  2010-07-06 11:19 future of -rt kernels for realtime audio Pedro Ribeiro
  2010-07-06 11:49 ` Robin Gareus
  2010-07-06 15:45 ` Mark Knecht
@ 2010-07-06 19:53 ` Philipp Überbacher
  2010-07-06 20:44   ` Pedro Ribeiro
  2 siblings, 1 reply; 5+ messages in thread
From: Philipp Überbacher @ 2010-07-06 19:53 UTC (permalink / raw)
  To: linux-rt-users

Excerpts from Pedro Ribeiro's message of 2010-07-06 13:19:31 +0200:
> Hi,
> 
> I've been using -rt kernels since 2.6.29 because I do realtime audio
> on my laptop.
> 
> The audio stability has been steadily improving since, and now I find
> that I can use 2.6.34 without the -rt patch and achieve the same
> stability as 2.6.33-rt - well, my latency requirements aren't that
> high, I just need to maintain 8.9ms completely stable, however before
> .34 it would be impossible without the -rt patch.
> 
> So out of curiosity, what changed for .34? According to [1], on .33
> Raw Spinlock Annotation was introduced in the mainline kernel.
> However, as said above, I can't get the same performance than with
> .34.
> 
> I remember that I read somewhere that the one the biggest problems
> with latency requirements was the use of the BKL. Do you think there
> will be a significant improvement of latency (in specific cases of
> course) with the scheduled removal of BKL for 2.6.36?
> 
> Thanks for the help,
> Pedro
> 
> [1] http://www.osadl.org/Realtime-Linux.projects-realtime-linux.0.html

Ah, nice to hear that the BKL removal is scheduled. Pretty much all I
know is that Linus set the BKL removal as precondition for preempt-rt to
be merged with mainline.
I guess this means that preempt-rt could disappear in some post-.36
version. I won't hold my breath.
Anyway, the stock kernel has been good for a while, but there are some
cases where I still experience big differences. Some, mostly audio
unrelated, actions or kinds of load cause lots of xruns with the stock
kernel and none with -rt. Prime example for me is xrandr, enable an
external monitor -> xruns, not so with -rt. There are a couple of other
cases. It's mostly about this kind of stuff, the achievable latency is
pretty much the same in my experience (which is only with an USB
interface).
-- 
Regards,
Philipp

--
"Wir stehen selbst enttäuscht und sehn betroffen / Den Vorhang zu und alle Fragen offen." Bertolt Brecht, Der gute Mensch von Sezuan

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: future of -rt kernels for realtime audio
  2010-07-06 19:53 ` Philipp Überbacher
@ 2010-07-06 20:44   ` Pedro Ribeiro
  0 siblings, 0 replies; 5+ messages in thread
From: Pedro Ribeiro @ 2010-07-06 20:44 UTC (permalink / raw)
  To: Philipp Überbacher; +Cc: linux-rt-users

On 6 July 2010 20:53, Philipp Überbacher <hollunder@lavabit.com> wrote:
> Excerpts from Pedro Ribeiro's message of 2010-07-06 13:19:31 +0200:
>> Hi,
>>
>> I've been using -rt kernels since 2.6.29 because I do realtime audio
>> on my laptop.
>>
>> The audio stability has been steadily improving since, and now I find
>> that I can use 2.6.34 without the -rt patch and achieve the same
>> stability as 2.6.33-rt - well, my latency requirements aren't that
>> high, I just need to maintain 8.9ms completely stable, however before
>> .34 it would be impossible without the -rt patch.
>>
>> So out of curiosity, what changed for .34? According to [1], on .33
>> Raw Spinlock Annotation was introduced in the mainline kernel.
>> However, as said above, I can't get the same performance than with
>> .34.
>>
>> I remember that I read somewhere that the one the biggest problems
>> with latency requirements was the use of the BKL. Do you think there
>> will be a significant improvement of latency (in specific cases of
>> course) with the scheduled removal of BKL for 2.6.36?
>>
>> Thanks for the help,
>> Pedro
>>
>> [1] http://www.osadl.org/Realtime-Linux.projects-realtime-linux.0.html
>
> Ah, nice to hear that the BKL removal is scheduled. Pretty much all I
> know is that Linus set the BKL removal as precondition for preempt-rt to
> be merged with mainline.
> I guess this means that preempt-rt could disappear in some post-.36
> version. I won't hold my breath.
> Anyway, the stock kernel has been good for a while, but there are some
> cases where I still experience big differences. Some, mostly audio
> unrelated, actions or kinds of load cause lots of xruns with the stock
> kernel and none with -rt. Prime example for me is xrandr, enable an
> external monitor -> xruns, not so with -rt. There are a couple of other
> cases. It's mostly about this kind of stuff, the achievable latency is
> pretty much the same in my experience (which is only with an USB
> interface).
> --
> Regards,
> Philipp
>
> --

I agree with you that there are some corner cases where you can
trigger xruns. However, I noticed a very big difference with 2.6.34.

It was easy to trigger xruns, even with .33-rt in the following situations:
- physical memory full, swap at 20%
- change virtual desktop (yes strange but it always triggered it)
- running cpu intensive apps
- lots of disk i/o happening

With vanilla .34, ALL of the above disappeared except the disk i/o
thing. I can safely say that .34 is more stable than .33-rt with the
latency I need (6 to 8 ms).

I'm using USB audio snd-usb-caiaq, and barely anything changed between
the two kernel versions. I still would not use it for live
performance, but then again, I don't do them :)

Regards,
Pedro
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-07-06 20:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-06 11:19 future of -rt kernels for realtime audio Pedro Ribeiro
2010-07-06 11:49 ` Robin Gareus
2010-07-06 15:45 ` Mark Knecht
2010-07-06 19:53 ` Philipp Überbacher
2010-07-06 20:44   ` Pedro Ribeiro

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).