Commit | Line | Data |
---|---|---|
1a388d7d LM |
1 | #!/bin/bash -e |
2 | # | |
3 | # rc.local | |
4 | # | |
5 | # This script is executed at the end of each multiuser runlevel. | |
6 | # Make sure that the script will "exit 0" on success or any other | |
7 | # value on error. | |
8 | # | |
9 | # In order to enable or disable this script just change the execution | |
10 | # bits. | |
11 | ||
12 | # distribute interrupt for eth0 on core 0 | |
13 | core=(800) | |
14 | eth=0 | |
15 | l=0 | |
16 | for i in $(awk '/eth'$eth'/ {sub(/:/, ""); print $1}' /proc/interrupts); do | |
d609e919 | 17 | echo ${core[$l]} > /proc/irq/$i/smp_affinity |
1a388d7d | 18 | l=$(expr $l + 1) |
87b7bc84 | 19 | [ $l -eq ${#core[*]} ] && l=0 |
1a388d7d LM |
20 | done |
21 | ||
22 | # distribute interrupt for eth1 on core 11 | |
23 | core=(1) | |
24 | eth=1 | |
25 | l=0 | |
26 | for i in $(awk '/eth'$eth'/ {sub(/:/, ""); print $1}' /proc/interrupts); do | |
d609e919 | 27 | echo ${core[$l]} > /proc/irq/$i/smp_affinity |
1a388d7d | 28 | l=$(expr $l + 1) |
87b7bc84 | 29 | [ $l -eq ${#core[*]} ] && l=0 |
1a388d7d LM |
30 | done |
31 | ||
a299db21 LM |
32 | # remove acpi cpu frequence controler |
33 | modprobe -r acpi_cpufreq | |
34 | ||
1a388d7d LM |
35 | # fill screen of dummy lines to keep last messages in history |
36 | for i in $(seq 1 25); do | |
37 | echo TRC6500 | |
38 | done | |
39 | ||
40 | exit 0 |