lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090517.205710.137526481.davem@davemloft.net>
Date:	Sun, 17 May 2009 20:57:10 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	dada1@...mosbay.com
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] net: tx scalability works : trans_start

From: Eric Dumazet <dada1@...mosbay.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@...mosbay.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?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ