From: Philippe Gerum <rpm@xenomai.org>
To: CHABAL David <david.chabal@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] awful latencies (~110us)
Date: Fri, 05 Oct 2007 16:02:57 +0200 [thread overview]
Message-ID: <1191592977.20623.142.camel@domain.hid> (raw)
In-Reply-To: <470611FA.30103@domain.hid>
On Fri, 2007-10-05 at 12:29 +0200, CHABAL David wrote:
> : func -114 ipipe_check_context (boomerang_start_xmit)
> : func -114 issue_and_wait (boomerang_start_xmit)
> : func -114 iowrite16 (issue_and_wait)
> : func -113! ioread16 (issue_and_wait)
> :|begin -84 common_interrupt (ioread16)
The Vortex driver does some brute force polling on the slow path, when
the adapter does not acknowledge the last command sent fast enough. It
seems your CPU is burning a lot of horsepower idling on this loop.
> :|func -83 __ipipe_handle_irq (common_interrupt)
> :|func -83 __ipipe_ack_irq (__ipipe_handle_irq)
> :|func -82 __ipipe_ack_level_irq (__ipipe_ack_irq)
> :|func -82 mask_and_ack_8259A (__ipipe_ack_level_irq)
> :|func -82+ __ipipe_spin_lock_irqsave (mask_and_ack_8259A)
> :|func -78 __ipipe_spin_unlock_irqrestore (mask_and_ack_8259A)
> :|func -78 __ipipe_dispatch_wired (__ipipe_handle_irq)
> :|func -77 xnintr_clock_handler (__ipipe_dispatch_wired)
> :|func -77 xnintr_irq_handler (xnintr_clock_handler)
> :|func -77 xnpod_announce_tick (xnintr_irq_handler)
> :|func -76 xntimer_do_tick_aperiodic (xnpod_announce_tick)
> :|func -76 xnthread_periodic_handler
> (xntimer_do_tick_aperiodic)
> :|func -76 xnpod_resume_thread (xnthread_periodic_handler)
> :|[ 3937] -75+ xnpod_resume_thread (xnthread_periodic_handler)
> :|func -72 xnpod_schedule (xnintr_irq_handler)
> :|[ 3497] -72+ xnpod_schedule (xnintr_irq_handler)
> :|func -71 __switch_to (xnpod_schedule)
> :|[ 3937] -70 xnpod_schedule (xnpod_suspend_thread)
> :|func -70 __ipipe_restore_pipeline_head
> (xnpod_wait_thread_period)
> :|end -69+ __ipipe_restore_pipeline_head
> (xnpod_wait_thread_period)
> :|begin -63 common_interrupt (__ipipe_restore_pipeline_head)
> :|func -62 __ipipe_handle_irq (common_interrupt)
> :|func -62 __ipipe_ack_irq (__ipipe_handle_irq)
> :|func -62 __ipipe_ack_level_irq (__ipipe_ack_irq)
> :|func -61 mask_and_ack_8259A (__ipipe_ack_level_irq)
> :|func -61! __ipipe_spin_lock_irqsave (mask_and_ack_8259A)
> :|func -40 __ipipe_spin_unlock_irqrestore (mask_and_ack_8259A)
20 us spent acknowledging the interrupt is damned slow. Any "spurious
8259A interrupt" message haunting your kernel log so far?
The sampling task is properly rescheduled after ~15us since the timer
interrupt receipt, problem is that other interrupts are preempting the
awaken task again and again before it has a chance to run. I wonder if
something fishy is not going on with the fast timer acknowledge, or the
network card. Could you:
- send us the output of /proc/interrupts
- try the patch below which should prevent any acknowledge nesting
errors at PIC level,
--- arch/i386/kernel/i8259.c~ 2007-09-16 16:54:34.000000000 +0200
+++ arch/i386/kernel/i8259.c 2007-10-05 15:47:41.000000000 +0200
@@ -176,11 +176,9 @@
goto spurious_8259A_irq;
#ifdef CONFIG_IPIPE
if (irq == 0) {
- /* Fast timer ack -- don't mask (unless supposedly
- spurious) */
- outb(0x20,PIC_MASTER_CMD);
- spin_unlock_irqrestore(&i8259A_lock, flags);
- return;
+ outb(0x60,PIC_MASTER_CMD); /* 'Specific EOI to master */
+ spin_unlock_irqrestore(&i8259A_lock, flags);
+ return;
}
#endif /* CONFIG_IPIPE */
cached_irq_mask |= irqmask;
--
Philippe.
next prev parent reply other threads:[~2007-10-05 14:02 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 [this message]
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
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=1191592977.20623.142.camel@domain.hid \
--to=rpm@xenomai.org \
--cc=david.chabal@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.