From: Jeff Garzik <jeff@garzik.org>
To: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: netdev@vger.kernel.org, therbert@google.com,
Ayaz Abdulla <aabdulla@nvidia.com>
Subject: Re: [PATCH] Reduce locking in TX path of forcedth driver
Date: Fri, 21 Dec 2007 22:51:26 -0500 [thread overview]
Message-ID: <476C89BE.9050700@garzik.org> (raw)
In-Reply-To: <20071221185435.2884f118@deepthought>
(Stephen, your mailer is snipping CC's, please fix....)
(Tom, you failed to CC the maintainer at NVIDIA, please fix...)
Stephen Hemminger wrote:
> On Fri, 21 Dec 2007 17:41:34 -0800 (PST)
> therbert@google.com (Tom Herbert) wrote:
>
>> Reduce the amount of locking in the TX path. Instead of using both netif_tx_lock and dev->priv->lock on transmitting, a single private lock (dev->priv->tx_lock) is used. This method is similar to that of the e1000 driver, including the logic to stop the queue in the start xmit functions, and the logic to wake the queue in the TX done functions. We see some performance improvement with this patch.
>>
>> Signed-off-by: Tom Herbert <therbert@google.com>
>
>
>>
>> + spin_lock_init(&np->tx_lock);
>> +
>> + dev->features |= NETIF_F_LLTX;
>> +
>
> NAK - lockless transmit is not desirable for real devices.
>
> use netif_tx_lock() instead of your private lock
True enough, though also note that (a) the forcedeth driver has many
problems in the locking department, and (b) anyone interested in working
on this problem should start with the existing -- working -- work in
progress that has already been posted to netdev a couple times:
Branch 'fe' of
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git
forcedeth (as it exists unmodified in upstream) tries so hard to be
lockless... that it winds up taking a ton of locks all over the place,
completely failing to reach its own goal.
Jeff
next prev parent reply other threads:[~2007-12-22 3:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-22 1:41 [PATCH] Reduce locking in TX path of forcedth driver Tom Herbert
2007-12-22 2:54 ` Stephen Hemminger
2007-12-22 3:51 ` Jeff Garzik [this message]
[not found] ` <65634d660712212149ua4f083dw80c65ea884902771@mail.gmail.com>
2007-12-23 2:13 ` Jeff Garzik
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=476C89BE.9050700@garzik.org \
--to=jeff@garzik.org \
--cc=aabdulla@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@linux-foundation.org \
--cc=therbert@google.com \
/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).