From: Jan Kiszka <jan.kiszka@domain.hid>
To: Dmitry Adamushko <dmitry.adamushko@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] Re: [shirq] first test results
Date: Mon, 13 Feb 2006 19:44:04 +0100 [thread overview]
Message-ID: <43F0D374.7010801@domain.hid> (raw)
In-Reply-To: <b647ffbd0602111058v3e8c6790w@domain.hid>
[-- Attachment #1.1: Type: text/plain, Size: 1800 bytes --]
Dmitry Adamushko wrote:
> On 11/02/06, Jan Kiszka <jan.kiszka@domain.hid> wrote:
>> Dmitry Adamushko wrote:
>>> And as an additional option,
>>> it could be interesting to print out to the log if not all "counter"
>> values
>>> then min,max,average (the same like for the latency :) per second or per
>>> 1000 interrupts; so to see whether tweaking the MAX_EDGEIRQ_COUNTER may
>> make
>>> the things better.
>> Yes, maybe it's too small. But this also depends on the absolute time
>> required for so many loops, something we should see in the traces then.
>> I'm afraid that we will finally have to move the UART's read-from-fifo
>> to task context to reduce the time spent in IRQ context.
>
> Good. Keep me informed as before.
>
We got it working. :)
First, we had to fix our own stupidity: the reception fifo depth of the
serial ports were set to one, thus we basically got one IRQ every 20 us.
Of course the CPU was too slow for this storm and therefore we got the
overruns. After increasing this threshold to 14, things improved
significantly - but also the worst-case IRQ-off time. Well, that's a
trade-off we likely have to make somehow between low IRQ load and long
IRQ-off times. Reducing the threshold to 4 e.g. gives shorter IRQ-off
times and still no overruns but also causes higher system load. This all
requires some more thoughts on the xeno_16550 design (IRQ handler vs.
user task for receiving and sending), will see when I find time for it.
Anyway, this works now. But we also found a bug, as usual, a clean-up
bug: You released the IRQ line based on the wrong test, see attached
patch. With this fix applied and the IRQ flags as well as the
/proc/xenomai/irq output cleaned up, I would say you great work is ready
for merge!
Thanks,
Jan
[-- Attachment #1.2: shirq-detach.patch --]
[-- Type: text/plain, Size: 589 bytes --]
--- ksrc/nucleus/intr.c.orig 2006-02-13 11:15:45.000000000 +0100
+++ ksrc/nucleus/intr.c 2006-02-13 19:22:57.000000000 +0100
@@ -393,9 +393,12 @@ int xnintr_detach (xnintr_t *intr)
if (e == intr)
{
/* Remove a given interrupt object from the list. */
- if ((*p = e->next) == NULL)
+ *p = e->next;
+
+ /* Release IRQ line if this was the last user */
+ if (shirq->handlers == NULL)
err = xnarch_release_irq(intr->irq);
-
+
xnarch_critical_exit(flags);
/* The idea here is to keep a detached interrupt object valid as long
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
next prev parent reply other threads:[~2006-02-13 18:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-10 18:03 [Xenomai-core] [shirq] first test results Jan Kiszka
2006-02-11 11:31 ` [Xenomai-core] " Dmitry Adamushko
2006-02-11 12:59 ` Jan Kiszka
2006-02-11 18:58 ` Dmitry Adamushko
2006-02-12 22:36 ` Jan Kiszka
2006-02-13 18:44 ` Jan Kiszka [this message]
2006-02-14 8:07 ` Dmitry Adamushko
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=43F0D374.7010801@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=dmitry.adamushko@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.