netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* root_lock vs. device's TX lock
@ 2011-11-17 16:10 Tom Herbert
  2011-11-17 16:34 ` Eric Dumazet
  0 siblings, 1 reply; 8+ messages in thread
From: Tom Herbert @ 2011-11-17 16:10 UTC (permalink / raw)
  To: Linux Netdev List

>From sch_direct_xmit:

        /* And release qdisc */
        spin_unlock(root_lock);

        HARD_TX_LOCK(dev, txq, smp_processor_id());
        if (!netif_tx_queue_frozen_or_stopped(txq))
                ret = dev_hard_start_xmit(skb, dev, txq);

        HARD_TX_UNLOCK(dev, txq);

        spin_lock(root_lock);

This is a lot of lock manipulation to basically switch from one lock
to another and possibly thrashing just to send a packet.  I am
thinking that if the there is a 1-1 correspondence between qdisc and
device queue then we could actually use the device's lock as the root
lock for the qdisc.  So in that case, we would need to touch any locks
from sch_direct_xmit (just hold root lock which is already device lock
for the duration).

Is there any reason why this couldn't work?

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-11-21 21:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-17 16:10 root_lock vs. device's TX lock Tom Herbert
2011-11-17 16:34 ` Eric Dumazet
2011-11-17 17:26   ` Eric Dumazet
2011-11-17 18:19     ` Dave Taht
2011-11-17 20:55       ` Andy Fleming
2011-11-18  0:35         ` Tom Herbert
2011-11-18  5:02           ` Eric Dumazet
2011-11-21 21:04       ` David Miller

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