netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dada1@cosmosbay.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] net: tx scalability works : trans_start
Date: Sun, 17 May 2009 20:57:10 -0700 (PDT)	[thread overview]
Message-ID: <20090517.205710.137526481.davem@davemloft.net> (raw)
In-Reply-To: <4A09D269.60703@cosmosbay.com>

From: Eric Dumazet <dada1@cosmosbay.com>
Date: Tue, 12 May 2009 21:47:53 +0200

> struct net_device trans_start field is a hot spot on SMP and high performance
> devices, particularly multi queues ones, because every transmitter dirties
> it. Is main use is tx watchdog and bonding alive checks.
> 
> But as most devices dont use NETIF_F_LLTX, we have to lock
> a netdev_queue before calling their ndo_start_xmit(). So it makes
> sense to move trans_start from net_device to netdev_queue. Its update
> will occur on a already present (and in exclusive state) cache line, for
> free.
> 
> We can do this transition smoothly. An old driver continue to
> update dev->trans_start, while an updated one updates txq->trans_start.
> 
> Further patches could also put tx_bytes/tx_packets counters in 
> netdev_queue to avoid dirtying dev->stats (vlan device comes to mind)
> 
> Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>

I like this patch so I'm adding it to net-next-2.6

But you can go one step further and untangle what is arguably
a huge mess.  There is no reason for the driver to set
->trans_start.

The driver gives us a success indication from ->hard_start_xmit()
and we can use that to set txq->trans_start.

Then you can kill the driver code that sets dev->trans_start and
then kill the netdev struct member as well.

Could you please do this work, thanks?

  reply	other threads:[~2009-05-18  3:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-12 19:47 [PATCH] net: tx scalability works : trans_start Eric Dumazet
2009-05-18  3:57 ` David Miller [this message]
2009-05-18  7:21   ` Eric Dumazet
2009-05-18 22:11     ` David Miller
2009-05-26  5:37       ` [PATCH] net: txq_trans_update() helper Eric Dumazet
2009-05-26  5:38         ` David Miller
2009-05-26  5:57           ` Eric Dumazet
2009-05-26  5:58             ` David Miller

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=20090517.205710.137526481.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dada1@cosmosbay.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).