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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 21 Dec 2007 22:51:26 -0500
From:	Jeff Garzik <jeff@...zik.org>
To:	Stephen Hemminger <shemminger@...ux-foundation.org>
CC:	netdev@...r.kernel.org, therbert@...gle.com,
	Ayaz Abdulla <aabdulla@...dia.com>
Subject: Re: [PATCH] Reduce locking in TX path of forcedth driver


(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@...gle.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@...gle.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



--
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