From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <5436A64B.90705@xenomai.org> Date: Thu, 09 Oct 2014 17:14:19 +0200 From: Gilles Chanteperdrix MIME-Version: 1.0 References: <542EA6A2.306@xenomai.org> <20141003191454.GF9452@sisyphus.hd.free.fr> <20141003224829.GA6850@sisyphus.hd.free.fr> <20141004113116.GC7596@sisyphus.hd.free.fr> <20141005220404.GL14975@sisyphus.hd.free.fr> <20141005223051.GN14975@sisyphus.hd.free.fr> <54365E17.3020102@xenomai.org> <5436607B.7090609@xenomai.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai] Switchtest failures on ODROIDU3 List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: GP Orcullo Cc: Xenomai On 10/09/2014 01:06 PM, GP Orcullo wrote: > On Oct 9, 2014 6:16 PM, "Gilles Chanteperdrix" < > gilles.chanteperdrix@xenomai.org> wrote: >> >> On 10/09/2014 12:12 PM, GP Orcullo wrote: >>> On Thu, Oct 9, 2014 at 6:06 PM, Gilles Chanteperdrix >>> wrote: >>>> On 10/09/2014 12:02 PM, GP Orcullo wrote: >>>>> On Mon, Oct 6, 2014 at 6:30 AM, Gilles Chanteperdrix >>>>> wrote: >>>>>> >>>>>> It means that Linux was interrupted by Xenomai during its timer >>>>>> interrupt, and that Xenomai interrupted it for 280us. This may >>>>>> happens with switchtest if it has a really long chain of context >>>>>> switches. If you want to check what happened, enable the I-pipe >>>>>> tracer, and trigger a trace freeze right before this message. >>>>>> >>>>>> -- >>>>>> Gilles. >>>>> >>>>> One more piece to the puzzle: disabling CONFIG_IPIPE_DEBUG_INTERNAL >>>>> causes the system to lockup. >>>>> >>>> How do you know this is related? >>>> >>>> -- >>>> Gilles. >>> >>> Sorry, I quoted the wrong message. >>> >>> If CONFIG_PREEMPT is disabled and CONFIG_IPIPE_DEBUG_INTERNAL is not >>> disabled, the system works fine. >>> >> So, there is a problem, likely in your port with CONFIG_PREEMPT, but >> maybe in Xenomai (I need to check, because I am not so sure I tested >> xeno-regression-test without CONFIG_PREEMPT). >> >> And there is a problem in your port without CONFIG_IPIPE_DEBUG_INTERNAL. >> This I do not need to check, I have tested Xenomai wihout this option >> enabled. >> >> So, my question is: how do you know the two issues are related? >> >> -- >> Gilles. > > I don't know the answer. > > I'm only looking at the effects and not the cause of the issue. > > So, where shall I start digging? What's in CONFIG_IPIPE_DEBUG_INTERNAL > that would somehow suppress the problem? > Quite frankly, I would go the other way: check that every piece of code which may be executed over real-time context does not use any Linux code. That does not include a lot of code, actually all that is covered by the porting guide: - the interrupt controller callbacks (note that the GIC handles some SOC specific callabcks, so if you have some, you need to check them) - the chained interrupt demux handlers - the timer and tsc management functions. - some workaround specific code that hooks in the iowrite/writel functions, such as the L2 cache synchronization on omap4. And it seems that is all, so, there should not be a lot of code to check. -- Gilles.