From mboxrd@z Thu Jan 1 00:00:00 1970 From: jamal Subject: [ofa-general] Re: [PATCH 1/4] [NET_SCHED] explict hold dev tx lock Date: Tue, 25 Sep 2007 09:15:38 -0400 Message-ID: <1190726138.4264.105.camel@localhost> References: <20070914090058.17589.80352.sendpatchset@K50wks273871wss.in.ibm.com> <20070916.161748.48388692.davem@davemloft.net> <1189988958.4230.55.camel@localhost> <1190569987.4256.52.camel@localhost> <1190570205.4256.56.camel@localhost> <1190674298.4264.24.camel@localhost> <1190677099.4264.37.camel@localhost> <20070924171411.36494656@freepuppy.rosehill> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: johnpol@2ka.mipt.ru, kumarkr@linux.ibm.com, herbert@gondor.apana.org.au, gaagaan@gmail.com, Robert.Olsson@data.slu.se, netdev@vger.kernel.org, rdreier@cisco.com, "Waskiewicz Jr, Peter P" , mcarlson@broadcom.com, kaber@trash.net, randy.dunlap@oracle.com, jagana@us.ibm.com, general@lists.openfabrics.org, mchan@broadcom.com, tgraf@suug.ch, jeff@garzik.org, sri@us.ibm.com, David Miller To: Stephen Hemminger Return-path: In-Reply-To: <20070924171411.36494656@freepuppy.rosehill> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: general-bounces@lists.openfabrics.org Errors-To: general-bounces@lists.openfabrics.org List-Id: netdev.vger.kernel.org On Mon, 2007-24-09 at 17:14 -0700, Stephen Hemminger wrote: > Since we are redoing this, > is there any way to make the whole TX path > more lockless? The existing model seems to be more of a monitor than > a real locking model. What do you mean it is "more of a monitor"? On the challenge of making it lockless: About every NAPI driver combines the tx prunning with rx polling. If you are dealing with tx resources on receive thread as well as tx thread, _you need_ locking. The only other way we can do avoid it is to separate the rx path interupts from ones on tx related resources; the last NAPI driver that did that was tulip; i think the e1000 for a short period in its life did the same as well. But that has been frowned on and people have evolved away from it. cheers, jamal