From: Roland Dreier <rdreier@cisco.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>,
mchan@broadcom.com, Jeff Garzik <jgarzik@pobox.com>,
netdev@vger.kernel.org
Subject: Re: netif_tx_disable and lockless TX
Date: Tue, 30 May 2006 21:13:48 -0700 [thread overview]
Message-ID: <ada3beq4yrn.fsf@cisco.com> (raw)
In-Reply-To: <20060531040307.GA6447@gondor.apana.org.au> (Herbert Xu's message of "Wed, 31 May 2006 14:03:07 +1000")
Herbert> However, lockless drivers do not take the xmit_lock so
Herbert> this method is ineffective. Such drivers need to do
Herbert> their own checking inside whatever locks that they do
Herbert> take. For example, tg3 could get around this by checking
Herbert> whether the queue is stopped in its hard_start_xmit
Herbert> function.
Yes, I had to add this to the IPoIB driver, because calling
netif_stop_queue() when the transmit ring was full was sometimes still
allowing hard_start_xmit to be called again:
/*
* Check if our queue is stopped. Since we have the LLTX bit
* set, we can't rely on netif_stop_queue() preventing our
* xmit function from being called with a full queue.
*/
if (unlikely(netif_queue_stopped(dev))) {
spin_unlock_irqrestore(&priv->tx_lock, flags);
return NETDEV_TX_BUSY;
}
this bug started a long thread a while back, but I don't remember if
there was any resolution.
Herbert> I must say though that I'm becoming less and less
Herbert> impressed by the lockless feature based on the number of
Herbert> problems that it has caused. Does anyone have any hard
Herbert> figures as to its effectiveness (excluding any stats
Herbert> relating to the loopback interface which can be easily
Herbert> separated from normal NIC drivers).
I don't have exact figures at hand, but I remember something like a 2 or
3 percent throughput improvement for IPoIB.
- R.
next prev parent reply other threads:[~2006-05-31 4:14 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-31 4:03 netif_tx_disable and lockless TX Herbert Xu
2006-05-31 4:13 ` David Miller
2006-05-31 4:17 ` Herbert Xu
2006-05-31 4:13 ` Roland Dreier [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-05-31 4:51 Michael Chan
2006-05-31 4:58 ` Herbert Xu
2006-05-31 5:11 ` David Miller
2006-05-31 5:14 ` Herbert Xu
2006-05-31 6:26 ` David Miller
2006-05-31 6:31 ` Herbert Xu
2006-05-31 7:08 ` David Miller
2006-05-31 12:06 ` Herbert Xu
2006-05-31 12:36 ` jamal
2006-05-31 12:40 ` Herbert Xu
2006-05-31 13:03 ` jamal
2006-05-31 17:52 ` Robert Olsson
2006-06-02 3:25 ` Stephen Hemminger
2006-06-02 10:46 ` Robert Olsson
2006-06-14 12:52 ` jamal
2006-05-31 21:20 ` Michael Chan
2006-06-01 0:09 ` David Miller
2006-06-01 0:25 ` Herbert Xu
2006-05-31 23:01 ` Michael Chan
2006-06-01 0:42 ` Herbert Xu
2006-06-01 0:27 ` Michael Chan
2006-06-01 2:27 ` Herbert Xu
2006-05-31 5:30 Michael Chan
2006-05-31 5:33 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ada3beq4yrn.fsf@cisco.com \
--to=rdreier@cisco.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=jgarzik@pobox.com \
--cc=mchan@broadcom.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).