public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Peter Hurley <peter@hurleysoftware.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	Mike Galbraith <umgwanakikbuti@gmail.com>,
	Francois Romieu <romieu@fr.zoreil.com>,
	Eric Dumazet <edumazet@google.com>,
	David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Greg KH <gregkh@linuxfoundation.org>,
	dmaengine@vger.kernel.org,
	John Ogness <john.ogness@linutronix.de>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: Softirq priority inversion from "softirq: reduce latencies"
Date: Mon, 29 Feb 2016 20:14:36 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.11.1602292009430.3638@nanos> (raw)
In-Reply-To: <56D493A5.403@hurleysoftware.com>

On Mon, 29 Feb 2016, Peter Hurley wrote:
> On 02/29/2016 10:24 AM, Eric Dumazet wrote:
> >> Just to be clear
> >>
> >> 		if (time_before(jiffies, end) && !need_resched() &&
> >> 		    --max_restart)
> >> 			goto restart;
> >>
> >> aborts softirq *even if 0ns have elapsed*, if NET_RX has woken a process.
> > 
> > Sure, now remove the 1st and 2nd condition.
> 
> Well just removing the 2nd condition has everything working fine,
> because that fixes the priority inversion.

No. It does not fix anything. It hides the shortcomings of the driver.
 
> However, when system resources are _not_ contended, it makes no
> sense to be forced to revert to ksoftirqd resolution, which is strictly
> intended as fallback.

No. You claim it is simply because your driver does not handle that situation
properly.
 
> Or flipping your argument on its head, why not just _always_ execute
> softirq in ksoftirqd?

Which is what that change effectivley does. And that makes a lot of sense,
because you get the softirq load under scheduler control and do not let the
softirq run as a context stealing entity which is completely uncontrollable by
the scheduler.

Running the softirq on return from interrupt can cause real priority
inversions.

Thanks,

	tglx

  reply	other threads:[~2016-02-29 19:14 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-27 18:19 Softirq priority inversion from "softirq: reduce latencies" Peter Hurley
2016-02-27 20:13 ` Eric Dumazet
2016-02-27 20:29   ` Peter Hurley
2016-02-27 23:04     ` David Miller
2016-02-27 23:33       ` Peter Hurley
2016-02-28  1:59         ` Eric Dumazet
2016-02-28  2:10           ` Peter Hurley
2016-02-28  2:17             ` Eric Dumazet
2016-02-28  4:46             ` David Miller
2016-02-28  5:55 ` Mike Galbraith
2016-02-28 17:01   ` Francois Romieu
2016-02-29  4:58     ` Mike Galbraith
2016-02-29 15:03       ` Peter Hurley
2016-02-29 15:19         ` Eric Dumazet
2016-02-29 15:54           ` Peter Hurley
2016-02-29 16:21             ` Eric Dumazet
2016-02-29 18:05               ` Peter Hurley
2016-02-29 18:24                 ` Eric Dumazet
2016-02-29 18:53                   ` Peter Hurley
2016-02-29 19:14                     ` Thomas Gleixner [this message]
2016-02-29 20:24                       ` David Miller
2016-02-29 23:04                       ` Peter Hurley
2016-02-29 15:27         ` Eric Dumazet
2016-02-29 19:13           ` Peter Hurley
2016-02-29 19:43             ` Eric Dumazet
2016-02-29 15:40         ` Mike Galbraith
2016-02-29 15:58           ` Peter Hurley
2016-02-29 16:24             ` Eric Dumazet
2016-02-29 17:16         ` David Miller
2016-03-07 15:31       ` Sebastian Andrzej Siewior
2016-03-07 17:06         ` Mike Galbraith
2016-03-07 15:48 ` Sebastian Andrzej Siewior

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=alpine.DEB.2.11.1602292009430.3638@nanos \
    --to=tglx@linutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=bigeasy@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=dmaengine@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peter@hurleysoftware.com \
    --cc=romieu@fr.zoreil.com \
    --cc=umgwanakikbuti@gmail.com \
    /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