On Tue, Aug 08, 2006 at 03:06:07PM -0700, David Miller wrote: > The driver ->hard_start_xmit() method is invoked with the queue > unlocked, so this kind of scheme would not be workable.
Looking at e1000, NETIF_F_LLTX is a waste -- the driver takes a spinlock almost immediately after entering. Taking the spinlock higher up in the network stack, preferably for multiple packets, would at least let the CPU deal with things sooner. tg3 doesn't use LLTX and thus holds the lock over hard_start_xmit(). bonding is atrocious and uses a read lock and unlock in many of the xmit routines. The only true lockless tx seems to be loopback. > While the queue is unlocked, another cpu could empty entries in the > TX queue making it not-full, which invalidates this "queue is now > full" return value the driver just gave. > > We don't do things the way we do it now for fun, it's just the most > reasonable scheme we've come up with given the locking constraints. Given that the vast majority of drivers are locked during their xmit routine, it is probably worth implementing at some point. -ben -- "Time is of no importance, Mr. President, only life is important." Don't Email: <[EMAIL PROTECTED]>. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html