[Rtai] running an infinite loop RTAI task

Alex Ivanov aivanov at ligo.caltech.edu
Sun Sep 28 01:40:33 CEST 2008



On Sun, 28 Sep 2008 mantegazza at aero.polimi.it wrote:
> > On Sat, 27 Sep 2008 mantegazza at aero.polimi.it wrote:
> >>
> >> Meanwhile I checked it all in kernel space, nothing changes. I can
> >> confirm
> >> that also on my machine a never ending loop on the reserved CPU, using
> >> isolcpus only, leads to a lock of other Linux activities. Since no
> >> interrupts is there I've still to understand what Linux tries to use on
> >> it.
> >
> > I've never done any real kernel debugging before. Is there a way to trace
> > where it is locking?
> >
> > Also, perhaps we can ask RTLinux guys about this, since it works just fine
> > there. Is anyone on friendly terms with Victor of FSMlabs? Additionally, I
> > am traveling to Monta Vista conference in San Francisco next week, maybe
> > I could find out something about it there. Definitely will be able to
> > try the same code there on Monta Vista Linux.
> >
> 
> RTLinux commercial is VXWorks now. I do not see how anybody can be of help
> on a totally different matter. They do not rely on an isolation technique
> of their own that seem to allow something that RTAI cannot achieve with
> Linux isolation/hotplugging.

Is there a mainstream kernel development forum where we, perhaps, could
ask about this problem?

> > One other question: is there a way to return control to Linux other than
> > wait_period call? I tried shed_yield but that changed nothing. I am
> > thinking that perhaps we can fix this problem by returning the CPU back to
> > Linux for a microsecond or two.
> 
> Yield work if there is another task at the same priority waiting to run,
> for an infinite loop is totally useless.
> start_rt_timer(0);
> rt_sleep(nano2count(nanos_delay));
> 
> In kernel space 1-2 us might be enough, but you should be ready to some
> increases if needed.


This works! It makes printks work as well.

Alex



More information about the Rtai mailing list