All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>, Florian Westphal <fw@strlen.de>,
	Patrick McHardy <kaber@trash.net>,
	Hagen Paul Pfeifer <hagen@jauu.net>,
	Jarek Poplawski <jarkao2@gmail.com>
Subject: Re: [BUG] net_sched: pfifo_head_drop problem
Date: Wed, 5 Jan 2011 09:15:47 -0800	[thread overview]
Message-ID: <20110105091547.200b49ad@nehalam> (raw)
In-Reply-To: <1294246850.2775.244.camel@edumazet-laptop>

On Wed, 05 Jan 2011 18:00:50 +0100
Eric Dumazet <eric.dumazet@gmail.com> wrote:

> While reviewing CHOKe stuff, I found following problem :
> 
> commit 57dbb2d83d100ea (sched: add head drop fifo queue)
> introduced pfifo_head_drop, and broke the invariant that
> sch->bstats.bytes and sch->bstats.packets are COUNTER (increasing
> counters only)
> 
> This can break estimators because est_timer() handle unsigned deltas
> only. A decreasing counter can then give a huge unsigned delta.
> 
> My suggestion would be to change things so that sch->bstats.bytes and
> sch->bstats.packets are incremented in dequeue() only, not at enqueue()
> time.
> 
> It would be more sensible anyway for very low speeds, and big bursts.
> Right now, if we drop packets, they still are accounted in estimators.
> 
> Or maybe my understanding of estimators is wrong, and only apply to
> enqueue rate, not dequeue rate ?
> 
> If so, we should remove the 
> 
> sch->bstats.bytes -= qdisc_pkt_len(skb_head);
> sch->bstats.packets--;
> 
> done in pfifo_tail_enqueue() in case we drop the head skb.
> 
> 
> My preference would be to add dropped pack/byte rates to estimators...
> It might be good for tuning.

Agreed counters should reflect dequeued packets not enqueued packets.


-- 

  reply	other threads:[~2011-01-05 17:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-05 17:00 [BUG] net_sched: pfifo_head_drop problem Eric Dumazet
2011-01-05 17:15 ` Stephen Hemminger [this message]
2011-01-05 20:35 ` [PATCH] " Eric Dumazet
2011-01-05 20:52   ` Hagen Paul Pfeifer
2011-01-05 21:39     ` 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=20110105091547.200b49ad@nehalam \
    --to=shemminger@vyatta.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=fw@strlen.de \
    --cc=hagen@jauu.net \
    --cc=jarkao2@gmail.com \
    --cc=kaber@trash.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.