Date: Thu, 15 Aug 2013 21:24:44 +0000 (UTC) From: Jack F Vogel <jfv@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254385 - stable/9/sys/dev/e1000 Message-ID: <201308152124.r7FLOiQs021559@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jfv Date: Thu Aug 15 21:24:43 2013 New Revision: 254385 URL: http://svnweb.freebsd.org/changeset/base/254385 Log: MFC r254264 Make the igb_mq_start() routine use TRYLOCK rather than simple queuing, there were latency and other problems with the latter. Modified: stable/9/sys/dev/e1000/if_igb.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) Modified: stable/9/sys/dev/e1000/if_igb.c ============================================================================== --- stable/9/sys/dev/e1000/if_igb.c Thu Aug 15 21:09:05 2013 (r254384) +++ stable/9/sys/dev/e1000/if_igb.c Thu Aug 15 21:24:43 2013 (r254385) @@ -972,7 +972,13 @@ igb_mq_start(struct ifnet *ifp, struct m que = &adapter->queues[i]; err = drbr_enqueue(ifp, txr->br, m); - taskqueue_enqueue(que->tq, &txr->txq_task); + if (err) + return (err); + if (IGB_TX_TRYLOCK(txr)) { + err = igb_mq_start_locked(ifp, txr); + IGB_TX_UNLOCK(txr); + } else + taskqueue_enqueue(que->tq, &txr->txq_task); return (err); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308152124.r7FLOiQs021559>