From: Jonathan David <jonathan.david@ni.com>
To: Thomas Gleixner <tglx@linutronix.de>, Henrik Austad <henrik@austad.us>
Cc: <linux-rt-users@vger.kernel.org>, <josh.cartwright@ni.com>
Subject: Re: [RFC] e1000e: Add delays after writing to registers
Date: Fri, 6 Nov 2015 12:38:41 -0600 [thread overview]
Message-ID: <563CF3B1.2040904@ni.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1511060929430.4032@nanos>
On 11/06/2015 05:08 AM, Thomas Gleixner wrote:
[..]
>
> Now my question is how big is the induced latency.
>
Here is one such trace we've captured.
---
cyclictest-2345 [002] 73.674891: hrtimer_init: hrtimer=0xffff8800b5b1feb8 clockid=CLOCK_MONOTONIC mode=HRTIMER_MODE_ABS
cyclictest-2345 [002] 73.674891: function: do_nanosleep
cyclictest-2345 [002] 73.674891: function: __hrtimer_start_range_ns
cyclictest-2345 [002] 73.674891: function: lock_hrtimer_base.isra.24
cyclictest-2345 [002] 73.674891: function: _raw_spin_lock_irqsave
cyclictest-2345 [002] 73.674891: function: enqueue_hrtimer
cyclictest-2345 [002] 73.674891: hrtimer_start: hrtimer=0xffff8800b5b1feb8 function=hrtimer_wakeup expires=73712055622 softexpires=73712055622
...
...
avahi-daemon-1385 [002] 73.675075: function: e1000e_set_rx_mode
avahi-daemon-1385 [002] 73.675078: function: __kmalloc
avahi-daemon-1385 [002] 73.675079: function: kmalloc_slab
avahi-daemon-1385 [002] 73.675079: function: e1000e_update_mc_addr_list_generic
avahi-daemon-1385 [002] 73.675080: bputs: e1000e_update_mc_addr_list_generic: replace MTA table
avahi-daemon-1385 [002] 73.675159: function: smp_apic_timer_interrupt
avahi-daemon-1385 [002] 73.675159: function: irq_enter
avahi-daemon-1385 [002] 73.675159: function: rcu_irq_enter
avahi-daemon-1385 [002] 73.675159: function: exit_idle
avahi-daemon-1385 [002] 73.675159: function: local_apic_timer_interrupt
avahi-daemon-1385 [002] 73.675159: function: hrtimer_interrupt
avahi-daemon-1385 [002] 73.675159: function: _raw_spin_lock
avahi-daemon-1385 [002] 73.675159: function: ktime_get_update_offsets
avahi-daemon-1385 [002] 73.675159: function: __run_hrtimer
avahi-daemon-1385 [002] 73.675160: hrtimer_cancel: hrtimer=0xffff8800b5b1feb8
avahi-daemon-1385 [002] 73.675160: function: __remove_hrtimer
avahi-daemon-1385 [002] 73.675160: hrtimer_expire_entry: hrtimer=0xffff8800b5b1feb8 now=73712084997 function=hrtimer_wakeup/0x0
---
After the wake-up timer is armed, the e1000e driver handles the network
link configuration after the NIC was reset. When the function
"e1000e_update_mc_addr_list_generic" is called, the MTA table is
rewritten (the writing of this table consists of >70 MMIO writes
followed by a read).
We see the hrtimer entry expire at the value 73712084997 near the bottom of the
trace.
73712084997ns - 73712055622ns = 29375ns
So, we see a ~29us latency, in comparison to a good case where we see about 1us.
Consistently, when we've seen large cyclictest latencies, we see that the e1000e
driver calls a function which uses e1e_flush after a large series of writes.
- JD
next prev parent reply other threads:[~2015-11-06 18:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-21 22:07 [RFC] e1000e: Add delays after writing to registers Jonathan David
2015-10-22 5:59 ` Henrik Austad
2015-11-03 17:43 ` Jonathan David
2015-11-03 19:42 ` Henrik Austad
2015-11-03 22:10 ` Jonathan David
2015-11-06 5:53 ` Henrik Austad
2015-11-06 11:08 ` Thomas Gleixner
2015-11-06 15:46 ` Armin Steinhoff
2015-11-06 17:22 ` Thomas Gleixner
2015-11-06 18:38 ` Jonathan David [this message]
2016-01-12 15:37 ` AW: " eg Engleder Gerhard
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=563CF3B1.2040904@ni.com \
--to=jonathan.david@ni.com \
--cc=henrik@austad.us \
--cc=josh.cartwright@ni.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=tglx@linutronix.de \
/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.