Re: Question about isolating CPU's
Emmanuel Pacaud <[email protected]>
| Newsgroups | gmane.linux.real-time.rtai |
|---|---|
| Message-ID | <[email protected]> |
Hi, Le mer. 13 avril 2016 à 23:26, Paolo Mantegazza <[email protected]> a écrit : > Sorry, i clicked the wrong button. > I'm assuming you are referring to irq affinities. > At the moment I've none ready, I usually write one for a specific > machine I'm working on. > It is simple and requires just these steps: > - "cat /proc/interrupts" to get the interrupts of interest > - writing for each of them "echo affinity_mask > >/proc/irq/irq_number_of_interest/smp_affinity" > Usually my scripts are just a list of the above command and made > executable, with the mask containing the bits of those cpus that are > not isolated for RTAI. > That's all. On fedora/redhat, there is a irqbalance service that could help you setup irq affinities. The configuration file of this service is in /etc/sysconfig/irqbalance. For example, if you want to isolate all the cpus except te first one, it should have the following content: # irqbalance is a daemon process that distributes interrupts across # CPUS on SMP systems. The default is to rebalance once every 10 # seconds. This is the environment file that is specified to systemd via the # EnvironmentFile key in the service unit file (or via whatever method the init # system you're using has. # # ONESHOT=yes # after starting, wait for a minute, then look at the interrupt # load and balance it once; after balancing exit and do not change # it again. IRQBALANCE_ONESHOT=yes # # IRQBALANCE_BANNED_CPUS # 64 bit bitmask which allows you to indicate which cpu's should # be skipped when reblancing irqs. Cpu numbers which have their # corresponding bits set to one in this mask will not have any # irq's assigned to them on rebalance # IRQBALANCE_BANNED_CPUS=fe # # IRQBALANCE_ARGS # append any args here to the irqbalance daemon as documented in the man page # IRQBALANCE_ARGS=-d Cheers, Emmanuel. _______________________________________________ Rtai mailing list [email protected] https://mail.rtai.org/cgi-bin/mailman/listinfo/rtai