Re: How to dedicate a CPU for real time applications?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/20/07, Bernhard Kuhn <kuhn@xxxxxxxxxxxxxx> wrote:

Hi!

Although -rt provides exceptionaly low latencies, i'd like
to try out further optimization by dedicating one CPU in
a SMP system for real time application ("Shielded CPU").

If applying "isolcpus=1", then most processes will be
bound to CPU0 as expected (per CPU kernel threads need
to stay), but, interrupts are still distributed amongst
CPUs. I tried to modify /proc/irq/*/smp_affinity, but
the cpu mask doesn't change for most interrupts.

Any ideas what could be the problem? TIA!

You have to enable IRQBALANCE in the kernel.
Then you have to disable the irqbalance daemon or else your carefully
redirected interrupts are directed back behind your back.
Then you can do /bin/echo 1 > /proc/irq/10/smp_affinity.
Beware that the mask is not updated immediately. It is updated the
next time an interrupt is serviced. This may take a long time if there
are only a few interrupts sent or none.

I'll write something up about this in the Real-Time Linux Wiki.

On a related note: I am working on a user space library to make it
easy to do CPU shielding of other processes (what you do with
isolcpus=1, but then dynamic) using the cpuset feature of the kernel.
I have only just begun to develop this library so only the very basic
features are implemented.

Let me know if someone is interested in using it.

    Robert
-
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux