Michael Buesch wrote: >[snip] > >Nice. What are the basic config settings you have to do? >How to bind rtai to a CPU? > > RTAPI already does this - it uses the highest numbered active CPU for RT tasks when compiled for SMP.
You need to use a kernel command-line parameter, isolcpus. This is a list of CPUs that the normal scheduler should not use. If you specify isolcpus=1 (for a two-processor system, use 3 for a quad), Linux will not use the second core. I have done reasonably extensive testing on an Intel Core 2 Duo CPU, and I found that the latencies weren't improved much simply by using an isolated CPU. What did help (a lot!) was making the Linux-managed core do a lot of nothing. Running the bash script `while true ; do echo "nothing" > /dev/null ; done` improved matters a lot. Some additional trimming of loaded modules, combined with using ext2 instead of ext3 (kjournald made a blip every 5 seconds) made that machine get 200-400ns average latencies, with the highest spikes still in the 2 us range. I suspect that a major improvement could be made on single or multiple core CPUs by locking some HAL data in CPU cache. Ideally the code would also be locked in cache, but that's a much harder problem. In some old testing, we found that the average latency dropped sharply when the BASE_PERIOD was reduced below some threshold (which was different depending on the CPU and system). Our assumption was that at very high interrupt rates, the code and/or data was never evicted from the CPU cache. - Steve ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users