linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ed Sweetman <ed.sweetman@wmich.edu>
To: linux-kernel@vger.kernel.org
Cc: kernel@kolivas.org, Daniel Phillips <phillips@arcor.de>
Subject: Re: Ingo Molnar and Con Kolivas 2.6 scheduler patches
Date: Sat, 26 Jul 2003 22:39:38 -0400	[thread overview]
Message-ID: <3F233B6A.6010603@wmich.edu> (raw)
In-Reply-To: <200307271517.55549.phillips@arcor.de>

(this was sent again because it didn't seem to get sent the first time)


My comment was towards the fact that although playing audio is a
realtime priority, decoding audio is not, and is not coded that way in
many programs, in fact, many programs will sleep() in order to decode
only when the output buffer is getting low.  This means it can have cpu
suddenly a lot less than it needs if load is added during this sleep()
because it was written assuming you could decode the necessary amount of
audio within the time it restarts the decode thread to the time the
output buffer can run out.
Simply put, try a few wav playing programs just playing wav files and
see how that performs skip-wise as the benchmark for realtime scheduling
performance instead of this xmms/whatever mp3 crap. I can cause
scheduling starvation-like performance by using certain decoders but not
others, this means using them at all is not acceptable to measure
anything kernel related. Just because what these decoders do worked
before doesn't mean that they are correct and the kernel is now wrong.
Stick with simple wav's since it's decode process is negliable, and no
gui.  Too many ways for the user app to be causing the problems and
we'll never get any worthwhile results.

if the kernel is having a schedular issue with realtime processes, you
should be able to get aplay to skip at a niceness of -20 by loading up
the machine with normal niced processes.  Technically, you shouldn't be
able to get aplay to skip at all as long as no other processes are at an
equal or higher nice value.









Daniel Phillips wrote:
> On Saturday 26 July 2003 13:35, Andrew Morton wrote:
> 
>>Daniel Phillips <phillips@arcor.de> wrote:
>>
>>>Audio players fall into a special category of application, the kind where
>>>it's not unreasonable to change the code around to take advantage of new
>>>kernel features to make them work better.
>>
>>One shouldn't even need to modify the player application to start using a
>>new scheduler policy - policy is inherited, so a wrapper will suffice:
>>
>>	sudo /bin/run-something-as-softrr mplayer
> 
> 
> True, and that's roughly what I do now (except just with elevated priority as 
> opposed to a realtime scheduler policy).  However, it's more friendly to the 
> system if the realtime priority is limited to just the thread that needs it, 
> and that's why the application itself needs to provide the hint.
> 
> Zinf already does try to provide such a hint by setting a higher priority for 
> its sound servicing thread.  Unfortunately, this is ignored unless zinf is 
> running as root.  Given the number of bugs in Zinf, I am uncomfortable 
> running the whole application as root.  It's altogether more conservative to 
> limit the risk to a single, simple thread that can be easily audited.
> 
> 
>>>Remember this word: audiophile.
>>
>>That is one problem space, and I guess if we fix that, we fix the X11
>>problems too.
>>
>>Let us not lose sight of the other problem: particular sleep/run patterns
>>as demonstrated in irman are causing extremem starvation.  Arguably we
>>should be addressing this as the higher priority problem.
> 
> 
> I agree it's the more important problem, but there are also more people 
> already working on it, whereas over here in the audio corner, there are just 
> Davide and me (sorry if I left anyone out, please feel free to flame me so I 
> know who you are).
> 
> 
>>It is interesting that Felipe says that stock 2.5.69 was the best CPU
>>scheduler of the 2.5 series.  Do others agree with that?
> 
> 
> I never tried audio until 2.5.73.  With Con's patches, life has been pretty 
> good for me from then on, from the non-starvation point of view.
> 
> 
>>And what about the O(1) backports?  RH and UL and -aa kernels?  Are people
>>complaining about those kernels?  If not, why?  What is different?
> 
> 
> In case anybody wants to hearken back to the good old days of 2.4, forget it. 
> It is only good for sound if you are lucky enough to have a configuration it 
> likes.  My unlucky wife on the other hand, who gets by with a 233 MHz K6 
> (because she can) is running 2.4 and says sound skips whenever she does 
> anything with the machine other that just letting it sit and play.  Now that 
> I think of it, this will be an ideal machine for testing audio robustness, 
> and scheduler robustness in general.
> 
> Regards,
> 
> Daniel
> 
> -
> 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/
> 




  parent reply	other threads:[~2003-07-28 13:30 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-26  9:30 Ingo Molnar and Con Kolivas 2.6 scheduler patches Felipe Alfaro Solana
2003-07-26  9:46 ` Marc-Christian Petersen
2003-07-26 10:02   ` Ismael Valladolid Torres
2003-07-26 10:10     ` Eugene Teo
2003-07-26 11:24       ` Ed Sweetman
2003-07-26 17:00         ` Rahul Karnik
2003-07-27 15:46         ` Daniel Phillips
2003-07-26 16:52           ` Diego Calleja García
2003-07-26 18:35           ` Andrew Morton
2003-07-26 23:01             ` Diego Calleja García
2003-07-28  9:38               ` Felipe Alfaro Solana
2003-07-28 10:37                 ` Måns Rullgård
2003-07-28 17:06                 ` Diego Calleja García
2003-07-27  2:38             ` Con Kolivas
2003-07-27  7:39               ` Willy Tarreau
2003-07-27  9:12                 ` Ingo Molnar
2003-07-27 11:54                   ` Con Kolivas
2003-07-27 20:18             ` Daniel Phillips
2003-07-26 22:05               ` Ed Sweetman
2003-08-01 15:38                 ` Daniel Phillips
2003-07-31 23:02                   ` Ed Sweetman
2003-07-27  2:39               ` Ed Sweetman [this message]
2003-07-29 13:56               ` Timothy Miller
2003-07-29 13:57                 ` Con Kolivas
2003-07-29 15:30                   ` Timothy Miller
2003-07-29 15:52                 ` Helge Hafting
2003-07-29 16:26                   ` Timothy Miller
2003-07-30 14:46                 ` Daniel Phillips
2003-07-29 15:40                   ` Timothy Miller
2003-07-30 16:17                     ` Daniel Phillips
2003-08-08 21:09                   ` Bill Huey
2003-08-06 21:28           ` Rob Landley
2003-08-07  9:34             ` Helge Hafting
2003-08-07 15:42             ` Daniel Phillips
2003-08-07 20:45               ` William Lee Irwin III
2003-08-07 20:51               ` Rob Landley
2003-08-07 21:40                 ` Ed Sweetman
2003-08-07 22:17                   ` William Lee Irwin III
2003-08-08  0:01                   ` Rob Landley
2003-08-09 20:52                   ` George Anzinger
2003-08-14  0:24                     ` Rob Landley
2003-08-14  8:01                       ` George Anzinger
2003-08-16  9:10                         ` Rob Landley
2003-08-16 14:29                           ` APM and 2.5.75 not resuming properly Jamie Lokier
2003-08-16 15:03                             ` Stephen Rothwell
2003-08-16 16:12                               ` Jamie Lokier
2003-08-16 20:43                             ` Rob Landley
2003-08-13  3:38                   ` Ingo Molnar and Con Kolivas 2.6 scheduler patches George Anzinger
2003-08-08  6:08                 ` Daniel Phillips
2003-07-26 12:08       ` Ismael Valladolid Torres
2003-07-26 14:54         ` Con Kolivas
2003-07-26 14:49     ` Con Kolivas
2003-07-26 14:47   ` Con Kolivas
2003-07-26 16:42     ` Lou Langholtz
2003-07-26 16:40       ` Jens Axboe
2003-07-26 18:19   ` William Lee Irwin III
2003-07-26 18:31     ` Felipe Alfaro Solana
2003-07-26 19:20       ` William Lee Irwin III
2003-07-26 19:47       ` William Lee Irwin III
2003-07-27  9:24 ` Ingo Molnar
2003-07-27  9:57   ` Con Kolivas
2003-07-27 10:02     ` Ingo Molnar
2003-07-27 10:19       ` Con Kolivas
2003-07-28 22:44     ` Timothy Miller
2003-07-26 14:44 Downing, Thomas

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=3F233B6A.6010603@wmich.edu \
    --to=ed.sweetman@wmich.edu \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phillips@arcor.de \
    /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).