All of lore.kernel.org
 help / color / mirror / Atom feed
From: "CHABAL David" <david.chabal@domain.hid>
To: rpm@xenomai.org
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] awful latencies (~110us)
Date: Mon, 22 Oct 2007 16:28:36 +0200	[thread overview]
Message-ID: <471CB394.4060905@domain.hid> (raw)
In-Reply-To: <1192713511.5884.12.camel@domain.hid>

Philippe Gerum a écrit :
> On Thu, 2007-10-18 at 14:38 +0200, CHABAL David wrote:
>> Philippe Gerum a écrit :
>>> On Wed, 2007-10-17 at 17:46 +0200, CHABAL David wrote:
>>>> Philippe Gerum a écrit :
>>>>> On Wed, 2007-10-17 at 16:52 +0200, CHABAL David wrote:
>>>>>>> Grmmff... I think the PIC on this box has some deep troubles; please try
>>>>>>> this patch, in replacement of the previous ipipe_trace_special
>>>>>>> instrumentation:
>>>>>>>
>>>>>> RTD|       8.348|      10.387|      43.647|       0|       6.098| 
>>>>>> 80.440
>>>>>> ---|------------|------------|------------|--------|-------------------------
>>>>>> RTS|       6.098|      10.020|      80.440|       0|    00:17:20/00:17:20
>>>>>> [root@domain.hid bin]#
>>>>>>
>>>>>>
>>>>>> IRQ handling takes 17µs in the worst case.
>>>>>>
>>>>>> It takes a long time to write 3 poor bytes...
>>>>>>
>>>>> Indeed. Each outb to the ISA bus should be somewhere in the 1-2.5 us
>>>>> range depending on the hw, maybe a bit higher in case of contention, but
>>>>> not that much.
>>>>>
>>>>>> May be is it a SMI problem ??? (Globally disable SMI is on)
>>>>>>
>>>>> It's less likely with an ICH-2 chipset.
>>>>>
>>>>> I see that CONFIG_IDEDMA_PCI_AUTO is disabled. Any reason not to use PCI
>>>>> DMA when available for IDE drives with your hw?
>>>>>
>>>> I read this about DMA:
>>>> http://www.rtai.dk/cgi-bin/gratiswiki.pl?DMA_And_Jitter
>>>>
>>> As usual, usage of DMA in real-time situations is a trade-off, and
>>> should be evaluated within the context of the hw at hand. DMA does bus
>>> mastering, but OTOH, forcing PIO raises native Linux latencies, which
>>> also has some drawbacks for real-time kernels implementing RT/non-RT
>>> mode transitions for tasks like Xenomai and RTAI do. For this reason,
>>> you may want to try switching PCI DMA on for your platform, until it
>>> does prove bad latency-wise.
>>>
>> I tested it but the results are almost the same.
>>
> 
> Good, at least you get PCI DMA back.
> 
>> I will try to upgrade my kernel to the 2.6.22 and to test again.
>>
> 
> At this point, it seems reasonable to think that your hw has some
> problems. You may want to confirm this by measuring the time spent in
> acknowledging interrupts on the slave i8259A in mask_and_ack_8259A(), on
> an unpatched 2.6.20 kernel (e.g. using a couple of rdtscll() within a
> single interrupt-free section). If you still reach peaks beyond 20us,
> then the odds of having the very same issue with newer kernels are high.
> 
>> David

Right. Adeos and Xenomai are innocents. Without then and with rdtscll, I get until 35 µs for
an IRQ handling (!).

So, I will change my HW.

Thanks for your help.

David




  reply	other threads:[~2007-10-22 14:28 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-05  7:52 [Xenomai-help] awful latencies (~110us) CHABAL David
2007-10-05  8:30 ` Gilles Chanteperdrix
2007-10-05  9:04   ` CHABAL David
2007-10-05  9:20     ` Philippe Gerum
2007-10-05 10:29       ` CHABAL David
2007-10-05 12:35         ` Jan Kiszka
2007-10-05 14:02         ` Philippe Gerum
2007-10-08 12:46           ` CHABAL David
2007-10-10 11:30             ` Philippe Gerum
2007-10-12 14:05               ` CHABAL David
2007-10-12 14:21                 ` Jan Kiszka
2007-10-12 14:26                   ` CHABAL David
2007-10-12 15:34                   ` Philippe Gerum
2007-10-12 15:49                     ` Jan Kiszka
2007-10-12 16:43                       ` Philippe Gerum
2007-10-17  8:25                         ` CHABAL David
2007-10-17  8:41                           ` Philippe Gerum
2007-10-17  8:55                             ` CHABAL David
2007-10-17  9:17                               ` Philippe Gerum
2007-10-17 13:14                                 ` CHABAL David
2007-10-17 13:46                                   ` Philippe Gerum
2007-10-17 14:52                                     ` CHABAL David
2007-10-17 15:24                                       ` Philippe Gerum
2007-10-17 15:46                                         ` CHABAL David
2007-10-17 16:05                                           ` Philippe Gerum
2007-10-18 12:38                                             ` CHABAL David
2007-10-18 13:18                                               ` Philippe Gerum
2007-10-22 14:28                                                 ` CHABAL David [this message]
2007-10-17  8:56                             ` Philippe Gerum
2007-10-17  8:43                           ` 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=471CB394.4060905@domain.hid \
    --to=david.chabal@domain.hid \
    --cc=rpm@xenomai.org \
    --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.