netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: therbert@google.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 0/3] net: Byte queue limit patch series
Date: Sun, 01 May 2011 20:49:38 -0700 (PDT)	[thread overview]
Message-ID: <20110501.204938.226758514.davem@davemloft.net> (raw)
In-Reply-To: <BANLkTinFmfJbYxvZ+6rrAy+6XsfwF5an5Q@mail.gmail.com>

From: Tom Herbert <therbert@google.com>
Date: Sun, 1 May 2011 19:41:34 -0700

> On Fri, Apr 29, 2011 at 11:54 AM, David Miller <davem@davemloft.net> wrote:
>> Add new interface, netdev_free_tx_skb(txq, skb) which can do the
>> completion accounting.  Actually the 'txq' argument is probably
>> superfluous as it can be obtained from the skb itself.
>>
> Okay, but I think the call at the end of TX completion processing is
> still probably needed.  The algorithm is trying to determine the
> number of bytes that completed at each interrupt.

Ok, then call it something generic like netdev_tx_complete() which
can serve other purposes in the future and not be bql specific.

>> Finally, you manage the bql limit logic in the existing generic netdev
>> TX start/stop interfaces.  If the user asks for "start" but the bql
>> is overlimit, simply ignore the request.  The driver will just signal
>> another "start" when the next TX packet completes.
>>
>> Similarly, when the qdisc is queuing up a packet to
>> dev_hard_start_xmit() you can, for example, preemptively do a "stop"
>> on the queue if you find bql is overlimit.
>>
> Unfortunately, there is still an additional complexity if we don't
> piggy back on the logic in the driver to stop the queue.  I believe
> that either this would require another queue state for queue being
> stopped for bql which looks pretty cumbersome, so that wrapping this
> in a qdisc might be a better possibility.

I'll leave it up to you what approach to try next.

Even thought I sort of side with you that bql is a largely seperate
facility from what we usually do with qdiscs, this TX completion
event could be very useful as an input to qdisc decision making.

      reply	other threads:[~2011-05-02  3:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-26  4:38 [PATCH 0/3] net: Byte queue limit patch series Tom Herbert
2011-04-26  5:56 ` Bill Fink
2011-04-26  6:17   ` Eric Dumazet
2011-04-26  6:14 ` Eric Dumazet
2011-04-26 16:57 ` Rick Jones
2011-04-29 18:54 ` David Miller
2011-05-02  2:41   ` Tom Herbert
2011-05-02  3:49     ` David Miller [this message]

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=20110501.204938.226758514.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).