[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1294246850.2775.244.camel@edumazet-laptop>
Date: Wed, 05 Jan 2011 18:00:50 +0100
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Miller <davem@...emloft.net>
Cc: netdev <netdev@...r.kernel.org>, Florian Westphal <fw@...len.de>,
Patrick McHardy <kaber@...sh.net>,
Hagen Paul Pfeifer <hagen@...u.net>,
Stephen Hemminger <shemminger@...tta.com>,
Jarek Poplawski <jarkao2@...il.com>
Subject: [BUG] net_sched: pfifo_head_drop problem
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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists