From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>,
David Miller <davem@davemloft.net>
Cc: Netdev <netdev@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: irq_fpu_usable() is false in ndo_start_xmit() for UDP packets
Date: Mon, 16 Nov 2015 23:27:10 +0100 [thread overview]
Message-ID: <1447712830.2096939.441563921.3680DBCF@webmail.messagingengine.com> (raw)
In-Reply-To: <CAHmME9o3s5iTZ4gcFVQ1xTu9PaaLjkEGcvhJRF+S=0GugxhQ8Q@mail.gmail.com>
Hi Jason,
On Mon, Nov 16, 2015, at 21:58, Jason A. Donenfeld wrote:
> Hi David,
>
> On Mon, Nov 16, 2015 at 9:32 PM, David Miller <davem@davemloft.net>
> wrote:
> > Network device driver transmit executes with software interrupts
> > disabled.
> >
> > Therefore on x86, you cannot use the FPU.
>
> That is extremely problematic for me. Is there a way to make this not
> so? A driver flag that would allow this?
>
> Also - how come it irq_fpu_usable() is true when using TCP but not
> when using UDP?
>
> Further, irq_fpu_usable() doesn't only check for interrupts. There are
> two other conditions that allow the FPU's usage, from
> arch/x86/kernel/fpu/core.c:
>
> bool irq_fpu_usable(void)
> {
> return !in_interrupt() ||
> interrupted_user_mode() ||
> interrupted_kernel_fpu_idle();
> }
Use the irqsoff tracer to find the problematic functions which disable
interrupts and try to work around it in case of UDP. This could benefit
the whole stack.
Bye,
Hannes
next prev parent reply other threads:[~2015-11-16 22:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-16 19:52 Jason A. Donenfeld
2015-11-16 20:32 ` David Miller
2015-11-16 20:58 ` Jason A. Donenfeld
2015-11-16 21:17 ` David Miller
2015-11-16 21:28 ` Jason A. Donenfeld
2015-11-16 21:33 ` David Miller
2015-11-16 21:37 ` Jason A. Donenfeld
2015-11-16 22:27 ` Hannes Frederic Sowa [this message]
2015-11-16 23:57 ` Jason A. Donenfeld
2015-11-17 0:04 ` Jason A. Donenfeld
2015-11-17 12:38 ` David Laight
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=1447712830.2096939.441563921.3680DBCF@webmail.messagingengine.com \
--to=hannes@stressinduktion.org \
--cc=Jason@zx2c4.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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
all inboxes | Powered by JetHome®