From: Eric Dumazet <eric.dumazet@gmail.com>
To: Kirill Smelkov <kirr@mns.spb.ru>
Cc: David Miller <davem@davemloft.net>,
therbert@google.com, netdev@vger.kernel.org
Subject: Re: [PATCH v4 0/10] bql: Byte Queue Limits
Date: Fri, 02 Dec 2011 12:57:51 +0100 [thread overview]
Message-ID: <1322827071.2607.17.camel@edumazet-laptop> (raw)
In-Reply-To: <20111202112228.GB3433@tugrik.mns.mnsspb.ru>
Le vendredi 02 décembre 2011 à 15:22 +0400, Kirill Smelkov a écrit :
> On Thu, Dec 01, 2011 at 01:00:45PM -0500, David Miller wrote:
> > From: Kirill Smelkov <kirr@mns.spb.ru>
> > Date: Thu, 1 Dec 2011 20:50:18 +0400
> >
> > > One "regression" is it is now not possible to disable BQL at compile time,
> > > because CONFIG_BQL can't be set to "n" via usual ways.
> > >
> > > Description and patch below. Thanks.
> >
> > It's intentional, and your patch will not be applied.
> >
> > The Kconfig entry and option is merely for expressing internal dependencies,
> > not for providing a way to disable the code.
>
> I'm maybe wrong somewhere - sorry then, but why there is e.g.
>
> static inline void netdev_tx_sent_queue(struct netdev_queue *dev_queue,
> unsigned int bytes)
> {
> +#ifdef CONFIG_BQL
> + dql_queued(&dev_queue->dql, bytes);
> + if (unlikely(dql_avail(&dev_queue->dql) < 0)) {
> + set_bit(__QUEUE_STATE_STACK_XOFF, &dev_queue->state);
> + if (unlikely(dql_avail(&dev_queue->dql) >= 0))
> + clear_bit(__QUEUE_STATE_STACK_XOFF,
> + &dev_queue->state);
> + }
> +#endif
> }
>
>
> and that netdev_tx_sent_queue() is called on every xmit.
>
> I wanted to save cycles on my small/slow hardware and compile BQL out in
> case I know the system is not going to use it. I'm netdev newcomer, so
> sorry if I ask naive questions, but what's wrong it?
>
Its something like 4 or 5 instructions (granted your NIC is BQL
enabled). Really nothing compared to thousand of instructions per packet
spent in the stack and driver.
And BQL will benefit especially on your small/slow hardware, even if you
dont believe so or know yet.
BQL is probably the major new netdev functionality of the year.
Of course, you are free to patch your own kernel if you desperatly need
to save a few cycles per packet.
next prev parent reply other threads:[~2011-12-02 11:57 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-29 2:32 [PATCH v4 0/10] bql: Byte Queue Limits Tom Herbert
2011-11-29 4:23 ` Dave Taht
2011-11-29 7:02 ` Eric Dumazet
2011-11-29 7:07 ` Eric Dumazet
2011-11-29 7:23 ` John Fastabend
2011-11-29 7:45 ` Eric Dumazet
2011-11-29 8:03 ` John Fastabend
2011-11-29 8:37 ` Dave Taht
2011-11-29 8:43 ` Eric Dumazet
2011-11-29 8:51 ` Dave Taht
2011-11-29 14:57 ` Eric Dumazet
2011-11-29 16:24 ` Dave Taht
2011-11-29 17:06 ` David Laight
2011-11-29 14:24 ` Ben Hutchings
2011-11-29 14:29 ` Eric Dumazet
2011-11-29 16:06 ` Dave Taht
2011-11-29 16:41 ` Ben Hutchings
2011-11-29 17:28 ` Rick Jones
2011-11-29 16:46 ` Eric Dumazet
2011-11-29 17:47 ` David Miller
2011-11-29 18:31 ` Tom Herbert
2011-12-01 16:50 ` Kirill Smelkov
2011-12-01 18:00 ` David Miller
2011-12-02 11:22 ` Kirill Smelkov
2011-12-02 11:57 ` Eric Dumazet [this message]
2011-12-02 12:26 ` Kirill Smelkov
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=1322827071.2607.17.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=kirr@mns.spb.ru \
--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