The later 2.1.x kernels seem to do this (warning: I haven't read the
source code, I just have a few thousand hours of experience with sound
card behavior on Linux systems ;-). Somewhere around 2.1.115 there was
a change that made open("/dev/dsp",...) succeed a lot more often. I
think it uses different flags on kmalloc() to cause memory to be swapped
out, but I haven't been following any of the 2.1.xx VM stuff so I'm not
an authority here.
On a machine with 128M of RAM which is dedicated to being mostly disk
cache (i.e. a web server) it is really hard to use the sound drivers
(i.e. to be an audio server as well). I have scripts which do this just
before opening the audio device:
dd obs=120000k < /dev/zero | head -c1
This forces Linux to swap out just about everything. After that there's
_lots_ of free memory. ;-)
I've been using this workaround since 1.3.XX. 2.2.1 still fails if there
is too much 'cached' memory (according to /proc/meminfo). I think it
can swap out anything but buffers in the low 16M or something, because
my workaround still works. Maybe the sound driver is just not aggressive
enough about trying to free memory.
I would appreciate a kernel flag that tells Linux to "_never_ use memory
below 16M and above the BSS of the kernel for any non-swappable data (e.g.
process descriptors, kernel stacks, and page tables, all of which can't
be swapped last time I checked). I have 112 megabytes of RAM available
for such data. Use it."
-- Zygo Blaxell, Linux Engineer, Corel Corporation, zygob@corel.ca (work), zblaxell@furryterror.org (play). It's my opinion, I tell you! Mine! All MINE! Size of 'diff -Nurw [...] winehq corel' as of Mon Feb 22 10:14:00 EST 1999 Lines/files: In 2948 / 53, Out 28916 / 427, Both 31134 / 460- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/