All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <philippe.gerum@domain.hid>
To: Steven Seeger <sseeger@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] overhead
Date: Mon, 11 Feb 2008 21:11:47 +0100	[thread overview]
Message-ID: <47B0AC03.9050403@domain.hid> (raw)
In-Reply-To: <51CAD0CE1504444DBE77CBBE51A0135D376AF6@domain.hid>

Steven Seeger wrote:
>> Send those backtraces, please, and a disassembly of your running
> kernel
>> privately to me.
> 
> I don't have the backtraces because they'd occur and the system would
> freeze. I wasn't using serial console because my application uses both
> serial ports. I even noticed ipipe_ calls and 16554_ serial calls in the
> same backtrace.
> 
> Next time one occurs, I will be sure to post it.
> 

At least the topmost four/five lines would help. You will find
__ipipe_handle_irq within the call frame each time an interrupt is
taken, so you need to focus on which handler gets actually called. In
the case above, it seems a serial interrupt is involved, and what its
handler does might be the root of the issue.

>> Sorry, I just don't understand where the problem is, or maybe I did
> not
>> understand what you are exactly doing/expecting here.
> 
> I wanted to be warned if my main state thread ever went to secondary
> domain, so I used T_WARNSW. However, I posted this condition wrong. The
> SIGXCPU is caused by my calling assert() because my state thread had an
> overrun, which it should not have. The system is doing nothing at this
> point, but calling pthread_create() in a shadowed thread causes an
> overrun. The shadowed thread is priority 1, and the state thread is
> priority 50. The state thread runs at 100Hz so this should not be too
> bad on the system.
>

Creating threads should be kept out of real-time duties, it's just
unsafe in terms of latency (Btw, I hope you do reduce the default glibc
stacksize from 8Mb to something more sensible in a real-time application
context, given that mlockall is in effect).

>> If you actually take faults on behalf of the tick timer handler, then
> no
>> wonder why the CPU figures explode.
> 
> I don't understand what you mean here?
> 

ipipe_handle_irq will be present in every call frame on behalf of an
external or virtual interrupt context, therefore if you get a fault in
the interrupt handler like you reported lately, the time spent in the
fault recovery code will be charged to the interrupt context.

>> Older versions, or older kernels?
> 
> Xenomai 2.2 era. I think I used 2.6.18 or something. It was a long time
> ago.
> Steven
> 
> 


-- 
Philippe.


  reply	other threads:[~2008-02-11 20:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-11  6:04 [Xenomai-help] overhead Steven Seeger
2008-02-11 13:54 ` Jan Kiszka
2008-02-11 15:20   ` Steven Seeger
2008-02-11 16:10     ` Gilles Chanteperdrix
2008-02-11 17:43       ` Steven Seeger
2008-02-11 17:58         ` Jan Kiszka
2008-02-11 18:59         ` Philippe Gerum
2008-02-11 19:16           ` Steven Seeger
2008-02-11 20:11             ` Philippe Gerum [this message]
2008-02-11 20:18               ` Steven Seeger
2008-02-11 17:02     ` Jan Kiszka

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=47B0AC03.9050403@domain.hid \
    --to=philippe.gerum@domain.hid \
    --cc=sseeger@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.