From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752687AbbKPW1N (ORCPT ); Mon, 16 Nov 2015 17:27:13 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:52446 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751330AbbKPW1L (ORCPT ); Mon, 16 Nov 2015 17:27:11 -0500 Message-Id: <1447712830.2096939.441563921.3680DBCF@webmail.messagingengine.com> X-Sasl-Enc: nkjwnU4OhsImgoBQ8BePhSY4g7X5qeorhZHIvsBl8lC+ 1447712830 From: Hannes Frederic Sowa To: "Jason A. Donenfeld" , David Miller Cc: Netdev , LKML MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-37ba1837 In-Reply-To: References: <20151116.153214.1125103075112383723.davem@davemloft.net> Subject: Re: irq_fpu_usable() is false in ndo_start_xmit() for UDP packets Date: Mon, 16 Nov 2015 23:27:10 +0100 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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