From: Peter Zijlstra <peterz@infradead.org>
To: Jonathan Davies <jonathan.davies@citrix.com>
Cc: Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <eric.dumazet@gmail.com>
Subject: Re: [PATCH RFC] sched/core: Make idle_cpu return 0 if doing softirq work
Date: Mon, 21 Jul 2014 19:09:13 +0200 [thread overview]
Message-ID: <20140721170913.GQ3935@laptop> (raw)
In-Reply-To: <53CD4644.4010907@citrix.com>
On Mon, Jul 21, 2014 at 05:56:36PM +0100, Jonathan Davies wrote:
> >If your softirq takes _that_ long its broken anyhow.
>
> Modern NICs can sustain 40 Gb/s of traffic. For network device drivers that
> use NAPI, polling is done in softirq context. At this data-rate, the
> per-packet processing overhead means means that a lot of CPU time is spent
> in softirq.
>
> (CCing Dave and Eric for their thoughts about long-running softirq due to
> NAPI. The example I gave above was of xen-netback sending data to another
> virtual interface at a high rate.)
So thing more or less assume that softirq handling (as ran off the tail
of hardirqs) does not take longer than a tick. Otherwise things start to
pile up and you get all kinds of nasty. Not to mention you get into
horrid latencies etc..
How hard would you scream if people ran multi tick hard interrupts? Why
do you then think its OK so do the effective same thing?
> >>Instead, the following patch is a partial solution, only handling the case when
> >>the currently-executing CPU is in softirq context. This was sufficient to solve
> >>the problem I observed.
> >
> >NAK, IRQ and SoftIRQ are outside of what the scheduler can control, so
> >for its purpose the CPU is indeed idle.
>
> The scheduler can't control those things, but surely it wants to make the
> best possible placement for the things it can control? So it seems odd to me
> that it would ignore relevant information about the resources it can use. As
> I observed, it leads to pathological behaviour, and is easily fixed.
We already lower the compute capacity due to irq/softirq overhead, if we
don't correctly handle that then we need to fix that. But as far as the
scheduler is concerned that cpu is _IDLE_. We didn't put anything on,
and therefore there's not anything on, end of story.
next prev parent reply other threads:[~2014-07-21 17:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-18 12:59 [PATCH RFC] sched/core: Make idle_cpu return 0 if doing softirq work Jonathan Davies
2014-07-18 14:08 ` Peter Zijlstra
2014-07-21 16:56 ` Jonathan Davies
2014-07-21 17:09 ` Peter Zijlstra [this message]
2014-07-22 9:35 ` Hillf Danton
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=20140721170913.GQ3935@laptop \
--to=peterz@infradead.org \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=jonathan.davies@citrix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.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.