This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
realtime:documentation:howto:tools:cpu_shielding [2017/05/08 23:31] srodrig1 |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== CPU shielding using /proc and /dev/cpuset ====== | ||
- | ===== Interrupt shielding ===== | ||
- | ==== Kernel Space ==== | ||
- | In order to shield CPUs from individual interrupts being serviced on them you have to make sure that the following kernel configuration parameter is set: | ||
- | * CONFIG_IRQBALANCE | ||
- | ==== User Space ==== | ||
- | Then make sure that the interrupts are not automatically balanced by the irqbalance daemon. This daemon is started from the irqbalance init script. To disable once do: | ||
- | <code bash> | ||
- | $ /etc/init.d/irqbalance stop | ||
- | </code> | ||
- | To disable after next reboot do: | ||
- | <code bash> | ||
- | $ chkconfig irqbalance off | ||
- | </code> | ||
- | After this you can change the CPU affinity mask of each interrupt by doing: | ||
- | <code bash> | ||
- | $ echo hex_mask > /proc/irq/<irq_number>/smp_affinity | ||
- | </code> | ||
- | To check that the affinity mask has been set you can check the contents of the smp_affinity file. | ||
- | <WRAP center round important 100%> | ||
- | The mask is updated the next time an interrupt is serviced. So you may not see the change immediately. | ||
- | </WRAP> | ||