netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] net_sched: pfifo_head_drop problem
@ 2011-01-05 17:00 Eric Dumazet
  2011-01-05 17:15 ` Stephen Hemminger
  2011-01-05 20:35 ` [PATCH] " Eric Dumazet
  0 siblings, 2 replies; 5+ messages in thread
From: Eric Dumazet @ 2011-01-05 17:00 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, Florian Westphal, Patrick McHardy, Hagen Paul Pfeifer,
	Stephen Hemminger, Jarek Poplawski

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.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-01-05 21:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-05 17:00 [BUG] net_sched: pfifo_head_drop problem Eric Dumazet
2011-01-05 17:15 ` Stephen Hemminger
2011-01-05 20:35 ` [PATCH] " Eric Dumazet
2011-01-05 20:52   ` Hagen Paul Pfeifer
2011-01-05 21:39     ` David Miller

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).