[PlanetCCRMA] Script to set 2.6 RT features

Steve Harris S.W.Harris@ecs.soton.ac.uk
Tue Sep 14 15:16:01 2004

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

attaching a simple script to turn on all the 2.6 RT goodness, the line
that detects which IRQd things are soundcards (RTDEVS=...) is dodgy, but
it works for the card I care about, not sure what it should do really. I
CAnt find a list of active soundcard driver names that consistently
matches the ones used in /proc/irq/. Perhaps it should just poll them all.

- Steve

Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=rtsettings


RTDEVS="rtc "`lsmod | grep ^snd_pcm | awk '{print $4}' | sed 's/,/ /g;s/snd_//g'`

echo "threading all IRQs"
for i in /proc/irq/*/*/threaded; do
	echo "1" > "$i";

for i in $RTDEVS; do
	if [ -f /proc/irq/*/$i/threaded ]; then
		echo dethreading $i
		echo "0" > /proc/irq/*/$i/threaded;
		echo "(cannot find IRQ for $i)"

rmmod realcap
modprobe realcap allcaps=1

echo "premeption on"
echo "1" > /proc/sys/kernel/kernel_preemption
echo "premeption level 3"
echo "3" > /proc/sys/kernel/voluntary_preemption

for i in /sys/block/[hs]d[abcdefgh]; do
	echo "short queue for "`basename $i`
	echo "16" > $i/queue/max_sectors_kb