Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752813AbbKKUsG (ORCPT ); Wed, 11 Nov 2015 15:48:06 -0500 Received: from unicorn.mansr.com ([81.2.72.234]:45424 "EHLO unicorn.mansr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752148AbbKKUsE convert rfc822-to-8bit (ORCPT ); Wed, 11 Nov 2015 15:48:04 -0500 From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: David Miller Cc: romieu@fr.zoreil.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, slash.tmp@free.fr Subject: Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller References: <20151111.142650.1297832998846138251.davem@davemloft.net> <20151111.144840.430771235700359719.davem@davemloft.net> Date: Wed, 11 Nov 2015 20:47:55 +0000 In-Reply-To: <20151111.144840.430771235700359719.davem@davemloft.net> (David Miller's message of "Wed, 11 Nov 2015 14:48:40 -0500 (EST)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1179 Lines: 34 David Miller writes: > From: M?ns Rullg?rd > Date: Wed, 11 Nov 2015 19:35:05 +0000 > >>> I don't think it's silly at all. >> >> I'm sure I read somewhere that the time spent spinning on a lock should >> be kept as small as possible. >> >>> And unless you can measure it making a difference, don't knock the idea. >> >> I tried using netif_tx_lock() in the IRQ handler instead, and it locked >> up solid. Clearly that was the wrong thing to do. > > Oh that's right, it's a BH lock not an IRQ one. > > Yet another argument for doing everything in ->poll(), thus making all > operations outside of NAPI scheduling run in software interrupt > context, and therefore being able to make use of the TXQ lock for > this. Well, I tried calling the DMA restart function from NAPI poll under netif_tx_lock(). Now it works only as long as there is incoming traffic. -- M?ns Rullg?rd mans@mansr.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/