Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752573AbbKKMWi (ORCPT ); Wed, 11 Nov 2015 07:22:38 -0500 Received: from unicorn.mansr.com ([81.2.72.234]:44003 "EHLO unicorn.mansr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752196AbbKKMWh convert rfc822-to-8bit (ORCPT ); Wed, 11 Nov 2015 07:22:37 -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: <1447172063-27234-1-git-send-email-mans@mansr.com> <20151110233448.GA8646@electric-eye.fr.zoreil.com> <20151110.211121.422193831316296487.davem@davemloft.net> Date: Wed, 11 Nov 2015 12:22:28 +0000 In-Reply-To: <20151110.211121.422193831316296487.davem@davemloft.net> (David Miller's message of "Tue, 10 Nov 2015 21:11:21 -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: 1288 Lines: 33 David Miller writes: > From: M?ns Rullg?rd > Date: Wed, 11 Nov 2015 00:40:09 +0000 > >> When the DMA complete interrupt arrives, the next chain should be >> kicked off as quickly as possible, and I don't see why that would >> benefit from being done in napi context. > > NAPI isn't about low latency, it's about fairness and interrupt > mitigation. > > You probably don't even realize that all of the TX SKB freeing you do > in the hardware interrupt handler end up being actually processed by a > scheduled software interrupt anyways. > > So you are gaining almost nothing by not doing TX completion in NAPI > context, whereas by doing so you would be gaining a lot including > more simplified locking or even the ability to do no locking at all. TX completion is separate from restarting the DMA, and moving that to NAPI may well be a good idea. Should I simply napi_schedule() if the hardware indicates TX is complete and do the cleanup in the NAPI poll function? -- 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/