All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Paul Thomas <pthomas8589@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: linux-rt-users <linux-rt-users@vger.kernel.org>
Subject: Re: net latency, long wait for softirq_entry
Date: Fri, 18 Dec 2020 14:52:30 +0100	[thread overview]
Message-ID: <20201218135230.hb25ii2a3sbqrucw@linutronix.de> (raw)
In-Reply-To: <CAD56B7dKyiUBQctrrpLYU6XM5cjfXD10E1fFMU5GpAe00g_TZQ@mail.gmail.com>

On 2020-12-05 13:30:21 [-0500], Paul Thomas wrote:
> (this time with a proper subject)
> Hello,
Hi, 

> I've been testing out the 5.10 rt kernel[1], and now I'm trying to
> But then in the long latency case, instead of going straight to
> softirq_entry this is delayed and it does the softirq_entry from the
> ksoftirqd task instead of the irq/30-eth%d task. The problem is that
> before ksoftirqd runs, another lower priority task runs (in this case
> it's the macb tx interrupt thread at priority 80, but I've seen this
> be user threads in slightly different tests). It seems the paths
> diverge with a call to __kthread_should_park.
> 
> This is on an arm64 zynqmp platform.
> 
> Any thoughts on how this could be improved would be appreciated.

The usual flow is:
- wake IRQ thread
- IRQ thread raises NAPI (softirq NET_RX)
- NAPI is processed on the exit of the IRQ thread.

This flow was disturbed by the timer:
- stress-ng is running
- the HZ tick timer fired, raised TIMER softirq. This leads to waking
  the ksoftirqd thread to process it (this is normal).
- stress-ng continues.
- the networking IRQ fires. The thread is woken up, raises NET_RX
  softirq. Usually, the softirq would be invoked on return from the
  interrupt thread but since ksoftirqd is already woken nothing happens.
  It is delayed to ksoftirqd. The IRQ-thread goes idle.

Having a thread to run the tick-timer would avoid that scenario.

Side note: If the networking thread runs for a longer period of then it
will handover to ksoftirqd.

 -Paul

Sebastian

  parent reply	other threads:[~2020-12-18 13:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-05 18:30 net latency, long wait for softirq_entry Paul Thomas
2020-12-05 18:53 ` Paul Thomas
2020-12-18 13:52 ` Sebastian Andrzej Siewior [this message]
     [not found]   ` <CAFzL-7ujcJ4KDbgVoq-N6GRTWfemCA6hfqOzBGwcaDzt=0rGzQ@mail.gmail.com>
2020-12-18 16:49     ` Sebastian Andrzej Siewior
2020-12-21  0:08       ` Paul Thomas

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=20201218135230.hb25ii2a3sbqrucw@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=pthomas8589@gmail.com \
    --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.