Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: shemminger@vyatta.com, therbert@google.com, netdev@vger.kernel.org
Subject: Re: [RFC PATCH v2 0/9] bql: Byte Queue Limits
Date: Tue, 09 Aug 2011 10:06:13 +0200	[thread overview]
Message-ID: <1312877173.2371.2.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> (raw)
In-Reply-To: <20110809.004123.2080217558650594315.davem@davemloft.net>

Le mardi 09 août 2011 à 00:41 -0700, David Miller a écrit :
> From: Stephen Hemminger <shemminger@vyatta.com>
> Date: Mon, 8 Aug 2011 11:19:17 -0700
> 
> > On Mon, 8 Aug 2011 11:01:57 -0700
> > Tom Herbert <therbert@google.com> wrote:
> > 
> >> > Since transmit completion means calling dev_kfree_skb() why not account
> >> > there? You could add some info to netdev if necessary to get compile
> >> > the statistics.
> >> >
> >> The algorithm depends on knowing the total number of packets competed
> >> in a single execution of transmit completion (epic based).  We only
> >> want to recalculate the limits once per completion, which happens when
> >> the completion function is called.
> > 
> > So just add some stats to netdev and count the number of dev_kfree_skb
> > calls and do your work at napi complete.
> 
> No, I think what Tom's doing here is reasonable.
> 
> First off, drivers have never been required to do specific things if
> they return success for ->ndo_start_xmit().  They can kfree_skb(skb)
> and return NET_TX_SUCCESS, and that's fine.
> 
> This mean we can't use ->ndo_start_xmit() return values to drive the
> BQL engine.
> 
> So we simply have a way for the driver to say when it really does
> queue up a packet, and that might be useful for other things.
> 
> Second, you absolutely do not want to run the BQL engine on every
> single dev_kfree_skb() call.  You want to batch it, and that's what
> Tom's new interface does, and that is therefore quite reasonable
> too.
> 
> In fact, I think the best part about this revision of the BQL patches
> is the device driver interface. :-)
> 

I agree, it permits a smooth transition to selected drivers, even some
non NAPI ones ;)

In some stress situations, NAPI never completes, so it would also mean
adding a dql call in this case...




  reply	other threads:[~2011-08-09  8:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-08  4:43 [RFC PATCH v2 0/9] bql: Byte Queue Limits Tom Herbert
2011-08-08 13:06 ` jamal
2011-08-08 13:18   ` Johannes Berg
2011-08-25 15:29     ` Tom Herbert
2011-08-25 20:23       ` jamal
2011-08-25 15:19   ` Tom Herbert
2011-08-08 15:40 ` Stephen Hemminger
2011-08-08 17:51   ` Tom Herbert
2011-08-08 17:55     ` Stephen Hemminger
2011-08-08 17:56       ` Tom Herbert
2011-08-08 18:01       ` Tom Herbert
2011-08-08 18:19         ` Stephen Hemminger
2011-08-09  7:41           ` David Miller
2011-08-09  8:06             ` Eric Dumazet [this message]
2011-08-09 14:54               ` Stephen Hemminger
2011-08-09 18:28                 ` Tom Herbert
2011-08-12 18:20 ` Stephen Hemminger
2011-08-13  0:33   ` Tom Herbert
2011-08-13  0:38     ` Stephen Hemminger

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=1312877173.2371.2.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    --cc=therbert@google.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