CPU shielding using /proc and /dev/cpuset

From RTwiki
Revision as of 09:25, 20 April 2007 by Rhdv (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Interrupt shielding

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:


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:

# /etc/init.d/irqbalance stop

To disable after next reboot do:

# chkconfig irqbalance off

After this you can change the CPU affinity mask of each interrupt by doing:

# echo hex_mask > /proc/irq/irq_number/smp_affinity

To check that the affinity mask has been set you can check the contents of the smp_affinity file.
The mask is updated the next time an interrupt is serviced. So you may not see the change immediately.

More information can be found in /usr/src/kernel/Documentation/IRQ-affinity.txt.

Process shielding

The kernel has an cpuset feature that allows you to create cpusets for real-time purposes. The kernel interface is proc filesystem based. It is described in /usr/src/kernel/Documentation/cpusets.txt.

Personal tools