Am 23.09.2012 um 18:22 schrieb Kent A. Reed:

> On 9/23/2012 3:34 AM, Michael Haberler wrote:
>> I just stumbled upon an idea (yet untested) to improve latency with 
>> RT_PREEMPT on multicore cpu's like the atom
>> 
>> this assumes that rtapi_app in sim mode (plus hal_parport in usermode) will 
>> be the time-critical component
>> it borrows from the isolcpus=1 idea for RTAI where CPU1 would be reserved 
>> for the base thread
>> the idea is to do something similar for rtapi_app:
>> 
>> quote from: Max Krasnyansky's post in 
>> http://www.digipedia.pl/usenet/thread/19080/11385/
>> 
>>> Actually this is kind of available right now with vanilla 2.6 kernel.
>>> I'm talking about CPU reservation. Here is an example.
>>> Let's say we have dual CPU box and we want to dedicate CPU 1 to
>>> our application:
>>> - Configure the kernel with following boot options:
>>> isolcpus=1 acpi_irq_nobalance noirqbalance
>>> 
>>> This excludes CPU 1 from the scheduler balancing logic. And disables
>>> ACPI and SW irq balancing.
>>> Make sure that you don't run user-space IRQ balancer.
>>> 
>>> - Redirect all interrupts to CPU 0
>>> for i in /proc/irq/*; do
>>> echo 1 > $i/smp_affinity;
>>> done
>>> 
>>> - Your app call now migrate to CPU 1
>>> int cpu = 1;
>>> uint32_t mask = (1 << cpu);
>>> sched_setaffinity(0, sizeof(mask), (cpu_set_t *) &mask);
>>> 
>>> That's it. CPU 1 is yours. There will be almost zero activity on it, besides
>>> your task of course.
>>> 
>>> Max
>> what would needed to be done is to add the sched_setaffinity() code fragment 
>> to rtapi_app and do the boot/setup incantations before starting linuxcnc
>> 
>> - Michael
>> 
>> 
> <deleted prior messages in thread>
> 
> Thanks, Michael.
> 
> Despite my waspish comment about custom-building my own kernel, I found 
> myself doing just that, mostly because I know I'll have to relearn the 
> process anyway to re-purpose some ARM appliances I have in my toybox.
> 
> Nothing I've done so far in terms of turning off or deleting features 
> from the kernel has made any noticeable improvement over the distributed 
> Debian RT kernel, but of course I'm working in profound ignorance of 
> what's going on inside the Atom processor and the ASUS BIOS. I feel like 
> Rutherford trying to deduce the nature of atoms by shooting neutrons 
> into a metal foil. (Yes, the pun is intended; I'm a physicist after all!)

ok, in that case you probably know the famous letter Igor Kapitza had written 
to Rutherford who was away at a conference, and had forbidden strictly Kapitza 
(a bona-fide nut case) to engage in any experiments while he was away:

"Sir! Our experiment was a total success. We now know how an electric arc with 
130 kilo-amperes looks like..."


> 
> Regards,
> Kent
> 
> 
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://ad.doubleclick.net/clk;258768047;13503038;j?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> _______________________________________________
> Emc-developers mailing list
> Emc-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-developers


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to