Created
October 4, 2016 20:32
-
-
Save kernelOfTruth/856f41450bdd8cbfcd5c55760e4b750e to your computer and use it in GitHub Desktop.
Raising IRQ priority of device threads
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Sorted view: | |
# ps -eLo rtprio,cls,pid,pri,nice,cmd | grep "FF" | sort -r | |
# ps -eLo pid,cls,rtprio,pri,nice,cmd | grep -i "irq" | |
# For a non-RT kernel, use kernel option: threadirqs | |
# http://subversion.ffado.org/wiki/IrqPriorities | |
# http://alsa.opensrc.org/Rtirq | |
#piwl=$(pgrep "irq/.*-iwlwifi") | |
#[[ -n $piwl ]] && chrt -f -p 10 $piwl | |
#peth=$(pgrep "irq/.*-eth0") | |
#[[ -n $peth ]] && chrt -f -p 30 $peth | |
#peth=$(pgrep "irq/.*-eth1") | |
#[[ -n $peth ]] && chrt -f -p 30 $peth | |
peth=$(pgrep "irq/.*-eth") | |
[[ -n $peth ]] && chrt -f -p 75 $peth | |
# ehci instead of uhci | |
pmouse=$(pgrep "irq/23-ehci") | |
[[ -n $pmouse ]] && chrt -f -p 79 $pmouse | |
pmouse=$(pgrep "irq/20-ehci") | |
[[ -n $pmouse ]] && chrt -f -p 79 $pmouse | |
#pmouse=$(pgrep "irq/19-uhci") | |
#[[ -n $pmouse ]] && chrt -f -p 59 $pmouse | |
# ehci instead of uhci | |
pkey=$(pgrep "irq/23-ehci") | |
[[ -n $pkey ]] && chrt -f -p 79 $pkey | |
pmouse=$(pgrep "irq/20-ehci") | |
[[ -n $pkey ]] && chrt -f -p 79 $pkey | |
psnd=$(pgrep "irq/.*-snd_") | |
[[ -n $psnd ]] && chrt -f -p 85 $psnd | |
#pnouveau=$(pgrep "irq/.*-nouveau") | |
#[[ -n $pnouveau ]] && chrt -f -p 80 $pnouveau | |
pnvkm=$(pgrep "irq/.*-nvkm") | |
[[ -n $pnvkm ]] && chrt -f -p 84 $pnvkm | |
pnvkm=$(pgrep "irq/.*-i915") | |
[[ -n $pi915 ]] && chrt -f -p 84 $pi915 | |
pnvidia=$(pgrep "irq/.*-nvidia") | |
[[ -n $pnvidia ]] && chrt -f -p 84 $pnvidia | |
#pkbd=$(pgrep "irq/.*-i8042") | |
## 2 of them | |
#for p in $pkbd ; do | |
# chrt -f -p 60 $p | |
#done | |
prtc=$(pgrep "irq/.*-rtc0") | |
[[ -n $prtc ]] && chrt -f -p 90 $prtc | |
#( while true ; do | |
# # Does not have an IRQ until Xorg is running | |
# pnvidia=$(pgrep "irq/.*-nvidia") | |
# if [[ -n $pnvidia ]] ; then | |
# chrt -f -p 80 $pnvidia | |
# break | |
# fi | |
# sleep 20 | |
#done ) & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment