Want more features on Pastebin? Sign Up, it's FREE!
Guest

3.14-rt threadsirq bash rtprio set/chrt

By: a guest on Apr 18th, 2014  |  syntax: None  |  size: 2.13 KB  |  views: 59  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print  |  QR code  |  clone
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/bash
  2.  
  3. # This is mainly just a quick picture of sirq's in linux-l-pa 3.14(-3+)
  4. #
  5. # by default Linux will set my h/w interrupts to rtprio 50
  6. # So we will set them [the sirqs/softirq threads] slightly below that. In my example; i have a quad-core AMD Phenom
  7. # 0-3 is my four cores. There is always a sirq-* for each core.
  8. #
  9. # this could probably be done by a tool like rtirq - if it supports that. I've probably
  10. # end up writing a systemd service file or proper script at some point.
  11.  
  12. # softirq RCU [read-copy-write] ... keep rcu highest
  13.  
  14. chrt -f -p 49 `pgrep sirq-rcu/0`
  15. chrt -f -p 49 `pgrep sirq-rcu/1`
  16. chrt -f -p 49 `pgrep sirq-rcu/2`
  17. chrt -f -p 49 `pgrep sirq-rcu/3`
  18.  
  19. # sirq-sched [migrates other tasks across CPUs] ...you stay high to, with your friend below/together
  20.  
  21. chrt -f -p 48 `pgrep sirq-sched/0`
  22. chrt -f -p 48 `pgrep sirq-sched/1`
  23. chrt -f -p 48 `pgrep sirq-sched/2`
  24. chrt -f -p 48 `pgrep sirq-sched/3`
  25.  
  26. # sirq-tasklet [timing/mostly interrupt management] ...hangout with your buddy sched
  27.  
  28. chrt -f -p 48 `pgrep sirq-tasklet/0`
  29. chrt -f -p 48 `pgrep sirq-tasklet/1`
  30. chrt -f -p 48 `pgrep sirq-tasklet/2`
  31. chrt -f -p 48 `pgrep sirq-tasklet/3`
  32.  
  33. # sirq-high [a way to manage/prioritize tasklets?] ...let the highest get attention
  34.  
  35. chrt -f -p 47 `pgrep sirq-high/0`
  36. chrt -f -p 47 `pgrep sirq-high/1`
  37. chrt -f -p 47 `pgrep sirq-high/2`
  38. chrt -f -p 47 `pgrep sirq-high/3`
  39.  
  40. # sirq-blk [block device device management] ...you can set below that
  41.  
  42. chrt -f -p 46 `pgrep sirq-blk/0`
  43. chrt -f -p 46 `pgrep sirq-blk/1`
  44. chrt -f -p 46 `pgrep sirq-blk/2`
  45. chrt -f -p 46 `pgrep sirq-blk/3`
  46.  
  47. chrt -f -p 46 `pgrep sirq-blk-pol/0`
  48. chrt -f -p 46 `pgrep sirq-blk-pol/1`
  49. chrt -f -p 46 `pgrep sirq-blk-pol/2`
  50. chrt -f -p 46 `pgrep sirq-blk-pol/3`
  51.  
  52. # sirq-net-rx/tx [networking management] ...super low, to avoid interference with audio
  53.  
  54. chrt -f -p 14 `pgrep sirq-net-rx/0`
  55. chrt -f -p 14 `pgrep sirq-net-rx/1`
  56. chrt -f -p 14 `pgrep sirq-net-rx/2`
  57. chrt -f -p 14 `pgrep sirq-net-rx/3`
  58.  
  59. chrt -f -p 14 `pgrep sirq-net-tx/0`
  60. chrt -f -p 14 `pgrep sirq-net-tx/1`
  61. chrt -f -p 14 `pgrep sirq-net-tx/2`
  62. chrt -f -p 14 `pgrep sirq-net-tx/3`
  63.  
  64. exit 0
clone this paste RAW Paste Data