All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] Frozen timer IRQ - now traced with kgdb :)
Date: Sun, 09 Apr 2006 11:40:40 +0200	[thread overview]
Message-ID: <4438D698.1020104@domain.hid> (raw)
In-Reply-To: <4436A8D2.2060603@domain.hid>

Jan Kiszka wrote:
> 
> 
> Yep, I dug deeper meanwhile and also came across this.
> 
> I already have a trivial hack running here. The most tricky part for me
> was to learn quilt, but now I start to love it :). Here is a snapshot
> series for 2.6.15.5:
> 
> <kgdb series from CVS>
> prepare-ipipe-x86.patch
> adeos-ipipe-2.6.15-i386-1.2-01.patch
> kgdb-ipipe-x86.patch
>

In order to ease patch maintenance, we should move the relevant portions 
of this infrastructure to the I-pipe patch directly (i.e. I-pipe 
specific kgdb-ipipe-* code).

> I'm currently wondering if it makes sense to register a kgdb domain and
> "officially" capture all involved IRQs and events. So far the serial
> line IRQ is hard-coded (should be retrieved from some internal kgdb
> structure later). Anyway, it seems to work quite well, I'm currently
> stepping through a network IRQ at ipipe-level.
> 

Having a separate domain would allow to break into any runaway code from 
lower priority domains even with disabled interrupts, except the ipipe 
itself. This said, pushing a domain on top of Xenomai would break the 
assumption that hw interrupts are indeed disabled when operating due to 
the 'last domain optimization' feature, and introduce additional 
jittery. The other option would be to install a KGDB 'redirector' in 
__ipipe_handle_irq so that serial or network interrupts to KGDB would 
never be blocked by the stall bit; I would actually prefer this one.

> 
> While playing with this tool a bit, displaying the the ipipe structures,
> and thinking about the original problem again, I wondered what could
> cause a temporary (as I think to found out now) stalled xeno domain
> without locking up the system? Some irq-lock leaks at driver level (i.e.
> inside our own code)?
> 

At first sight, it might be related to the way __ipipe_unstall_iret_root 
operates. Basically, the idea is to make sure that the stall flag of the 
root domain upon return from the pipelining process always reflects the 
state of the hw interrupt flag at the time the processed event was taken 
by the CPU. It seems that your testcase shows that under some 
cicumstances, the root stage might be spuriously left in a stalled state 
by __ipipe_unstall_iret_root.

-- 

Philippe.


  reply	other threads:[~2006-04-09  9:40 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-04 21:29 [Xenomai-core] Frozen timer IRQ Jan Kiszka
2006-04-05  7:13 ` Philippe Gerum
2006-04-05 12:10 ` Gilles Chanteperdrix
2006-04-05 12:29   ` Philippe Gerum
2006-04-05 12:38   ` Philippe Gerum
2006-04-05 13:05     ` Philippe Gerum
2006-04-05 19:30       ` Jan Kiszka
2006-04-05 21:56         ` Jan Kiszka
2006-04-05 21:58           ` Jan Kiszka
2006-04-06 15:04           ` Philippe Gerum
2006-04-06 15:29             ` Jan Kiszka
2006-04-06 15:39               ` Philippe Gerum
2006-04-06 15:46                 ` Jan Kiszka
2006-04-06 17:15                   ` Philippe Gerum
2006-04-07 11:57                     ` Jan Kiszka
2006-04-07 13:02                     ` Jan Kiszka
2006-04-07 16:28                       ` Philippe Gerum
2006-04-07 16:39                         ` Philippe Gerum
2006-04-07 18:00                           ` [Xenomai-core] Frozen timer IRQ - now traced with kgdb :) Jan Kiszka
2006-04-09  9:40                             ` Philippe Gerum [this message]
2006-04-06 17:10         ` [Xenomai-core] Frozen timer IRQ Philippe Gerum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4438D698.1020104@domain.hid \
    --to=rpm@xenomai.org \
    --cc=jan.kiszka@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.