Linux scheduling threads for disk vs. sound card io

"Thomas Kimpton" <[email protected]>
Newsgroups gmane.comp.audio.zinf.devel
Message-ID <[email protected]>
I haven't been using zinf, on Linux, for a while... because it would
skip fairly regularly. (Also, MyMusic got to be dog slow adding new
music to > 20GB of music) If that's fixed, you can ignore the remainder
of this, if not, here's something I read, while reading about the
'anticipatory scheduler' that will, soon, be a part of the Linux
kernel:

> From: Andrew Morton
> Subject: Re: iosched: impact of streaming read on read-many-files
> Date: Fri, 21 Feb 2003 13:11:58 -0800
> Andrea Arcangeli wrote:
> >
> > CFQ is made for multimedia desktop usage only, you want to be sure
> > mplayer or xmms will never skip frames, not for parallel cp reading
> > floods of data at max speed like a database with zillon of threads.
For
> > multimedia not to skip frames 1M/sec is  more than enough bandwidth,
> > doesn't matter if the huge database in background runs much slower
as
> > far as you never skip a frame.
> 
> These applications are broken.  The kernel shouldn't be bending over
> backwards trying to fix them up.  Because this will never ever work as
well
> as fixing the applications.
> 
> The correct way to design such an application is to use an RT thread
to
> perform the display/audio device I/O and a non-RT thread to perform
the disk
> I/O.  The disk IO thread keeps the shared 8 megabyte buffer full.  The
RT
> thread mlocks that buffer.
> 
> The deadline scheduler will handle that OK.  The anticipatory
scheduler
> (which is also deadline) will handle it better.
> 
> If an RT thread performs disk I/O it is bust, and we should not try to
fix
> it.  The only place where VFS/VM/block needs to care for RT tasks is
in the
> page allocator.  Because even well-designed RT tasks need to allocate
pages.
> 
> The 2.4 page allocator has a tendency to cause 5-10 second stalls for
a
> single page allocation when the system is under writeout load.  That
is fixed
> in 2.5, but special-casing RT tasks in the allocator would make sense.


Tom Kimpton.

----
Unix IS user friendly. It's just picky who it's friends with.


-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.