From: David Miller <davem@davemloft.net>
To: krkumar2@in.ibm.com
Cc: peter.p.waskiewicz.jr@intel.com, netdev@vger.kernel.org
Subject: Re: [PATCH] PATCH 1/2 [SCHED 2.6.24]: Check subqueue status before calling hard_start_xmit
Date: Tue, 13 Nov 2007 22:14:39 -0800 (PST) [thread overview]
Message-ID: <20071113.221439.225154441.davem@davemloft.net> (raw)
In-Reply-To: <20071114060412.9556.84833.sendpatchset@localhost.localdomain>
From: Krishna Kumar <krkumar2@in.ibm.com>
Date: Wed, 14 Nov 2007 11:34:12 +0530
> Hi Peter,
>
> Peter wrote on 11/13/2007 11:14:50 PM:
> > @@ -134,7 +134,7 @@ static inline int qdisc_restart(struct net_device *dev)
> > {
> > struct Qdisc *q = dev->qdisc;
> > struct sk_buff *skb;
> > - int ret;
> > + int ret = NETDEV_TX_BUSY;
> >
> > /* Dequeue packet */
> > if (unlikely((skb = dev_dequeue_skb(dev, q)) == NULL))
> > @@ -145,7 +145,8 @@ static inline int qdisc_restart(struct net_device *dev)
> > spin_unlock(&dev->queue_lock);
> >
> > HARD_TX_LOCK(dev, smp_processor_id());
> > - ret = dev_hard_start_xmit(skb, dev);
> > + if (!netif_subqueue_stopped(dev, skb))
> > + ret = dev_hard_start_xmit(skb, dev);
> > HARD_TX_UNLOCK(dev);
>
> You could optimize this by getting HARD_TX_LOCK after the check. I
> assume that netif_stop_subqueue (from another CPU) would always be
> called by the driver xmit, and that is not possible since we hold
> the __LINK_STATE_QDISC_RUNNING bit. Does that sound correct?
I don't think this is a critical optimization at this time,
but something to certainly do along with the surgery
we'll undoubtedly be doing here in the future :-)
next prev parent reply other threads:[~2007-11-14 6:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-14 6:04 [PATCH] PATCH 1/2 [SCHED 2.6.24]: Check subqueue status before calling hard_start_xmit Krishna Kumar
2007-11-14 6:14 ` David Miller [this message]
2007-11-14 7:47 ` Krishna Kumar2
2007-11-14 8:28 ` Krishna Kumar2
2007-11-15 20:57 ` Waskiewicz Jr, Peter P
-- strict thread matches above, loose matches on Subject: below --
2007-11-13 17:44 [PATCH] SCHED: Fix unnecesary driver entries when queue is stopped PJ Waskiewicz
2007-11-13 17:44 ` [PATCH] PATCH 1/2 [SCHED 2.6.24]: Check subqueue status before calling hard_start_xmit PJ Waskiewicz
2007-11-14 4:41 ` 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=20071113.221439.225154441.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=krkumar2@in.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=peter.p.waskiewicz.jr@intel.com \
/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).