linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan David <jonathan.david@ni.com>
To: 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: Tue, 3 Nov 2015 11:43:21 -0600	[thread overview]
Message-ID: <5638F239.1030804@ni.com> (raw)
In-Reply-To: <20151022055909.GA7263@icarus.home.austad.us>

On 10/22/2015 12:59 AM, Henrik Austad wrote:
> On Wed, Oct 21, 2015 at 05:07:48PM -0500, Jonathan David wrote:
>> There is a noticeable impact on determinism when a large number of
>> writes are flushed. Writes to the hardware registers are sent across
>> the PCI bus and take a significant amount of time to complete after
>> a flush, which causes high priority tasks (including interrupts) to
>> be delayed.
>
> Do you see this in the entire system, or on the core where the write was
> triggered?

Only on the core where the writes are issued.

>> Adding a delay after long series of writes gives them time to
>> complete, and for higher priority tasks to run unimpeded.
>
> Aren't we running with threaded interrupts?
>
> What happens to the thread(s) pushing data to the network?
> What about xmit-buffer once it is full? Which thread will block on send or
> have its sk_buff dropped?

All of this is totally irrelevant to the problem we are seeing.

The e1000x driver itself is not responsible for the delay here. The 
issue is with PCI where issuing a large number of MMIO writes followed 
by a read (to force said writes to execute) will stall the CPU. When the 
CPU is stalled, no interrupts are serviced, including the local apic 
timer interrupt, which was responsible for waking up cyclictest. This 
behavior was observed within traces gathered from cyclictest with ftrace 
enabled.

> I'm not sure if adding random delay and giving an unpredictable impact on
> completely random threads is the best way to solve this..

Agreed, we know that this is a hack. Do you have any better solutions?

- JD

  reply	other threads:[~2015-11-03 17:57 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 [this message]
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
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=5638F239.1030804@ni.com \
    --to=jonathan.david@ni.com \
    --cc=henrik@austad.us \
    --cc=josh.cartwright@ni.com \
    --cc=linux-rt-users@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).