netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maxime Bizon <mbizon@freebox.fr>
To: Krishna Kumar <krkumar2@in.ibm.com>
Cc: davem@davemloft.net, Jarek Poplawski <jarkao2@gmail.com>,
	netdev@vger.kernel.org, herbert@gondor.apana.org.au,
	kaber@trash.net
Subject: Re: [PATCH ver2] Avoid enqueuing skb for default qdiscs
Date: Mon, 01 Feb 2010 10:52:20 +0100	[thread overview]
Message-ID: <1265017940.32192.23.camel@sakura.staff.proxad.net> (raw)
In-Reply-To: <20090806114421.19208.39374.sendpatchset@localhost.localdomain>


On Thu, 2009-08-06 at 17:14 +0530, Krishna Kumar wrote:

Hello,

> From: Krishna Kumar <krkumar2@in.ibm.com>
> 
> dev_queue_xmit enqueue's a skb and calls qdisc_run which
> dequeue's the skb and xmits it. In most cases, the skb that
> is enqueue'd is the same one that is dequeue'd (unless the
> queue gets stopped or multiple cpu's write to the same queue
> and ends in a race with qdisc_run). For default qdiscs, we
> can remove the redundant enqueue/dequeue and simply xmit the
> skb since the default qdisc is work-conserving.

Sorry old stuff, but I just noticed this.

One side effect of this patch is that tc now shows a lot of requeue for
slow interfaces (slow dsl link in my case), because sch_direct_xmit is
called even if device stopped its queue.

My first reflex was too investigate for a misbehaving driver (returning
TX_BUSY), but start_xmit is not even called, sch_direct_xmit notices
that queue is stopped, and just does a dequeue/requeue.

Since we're talking about slow interfaces, this has no impact on
performance, the requeue counter incrementing is just a bit scary.

Shouldn't we check for stopped queue earlier to avoid this ?

Regards,

-- 
Maxime



  parent reply	other threads:[~2010-02-01  9:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-06 11:44 [PATCH ver2] Avoid enqueuing skb for default qdiscs Krishna Kumar
2009-08-06 20:41 ` David Miller
2009-08-07  2:56   ` Krishna Kumar2
2009-08-07  3:08     ` David Miller
2009-08-06 20:49 ` Stephen Hemminger
2009-08-07  3:01   ` Krishna Kumar2
2010-02-01  9:52 ` Maxime Bizon [this message]
2010-02-01 13:42   ` Krishna Kumar2
2010-02-01 14:16     ` Maxime Bizon

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=1265017940.32192.23.camel@sakura.staff.proxad.net \
    --to=mbizon@freebox.fr \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=jarkao2@gmail.com \
    --cc=kaber@trash.net \
    --cc=krkumar2@in.ibm.com \
    --cc=netdev@vger.kernel.org \
    /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).