Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Patrick McHardy <kaber@trash.net>
Cc: Stephen Hemminger <shemminger@vyatta.com>,
	David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: Re: [PATCH] CHOKe flow scheduler (0.8)
Date: Fri, 14 Jan 2011 15:24:03 +0100	[thread overview]
Message-ID: <1295015043.3937.20.camel@edumazet-laptop> (raw)
In-Reply-To: <4D3055C2.3060807@trash.net>

Le vendredi 14 janvier 2011 à 14:55 +0100, Patrick McHardy a écrit :
> On 14.01.2011 14:54, Patrick McHardy wrote:
> > On 14.01.2011 00:34, Stephen Hemminger wrote:
> >> +static int choke_enqueue(struct sk_buff *skb, struct Qdisc *sch)
> >> +{
> >> ...
> >> +	/* Is queue small? */
> >> +	if (p->qavg <= p->qth_min)
> >> +		p->qcount = -1;
> >> +	else {
> >> +		struct sk_buff *oskb;
> >> +		unsigned int idx;
> >> +
> >> +		/* Draw a packet at random from queue */
> >> +		oskb = choke_peek_random(sch, &idx);
> >> +
> >> +		/* Both packets from same flow ? */
> >> +		if (*(unsigned int *)(qdisc_skb_cb(oskb)->data) == hash) {
> >> +			/* Drop both packets */
> >> +			q->stats.matched++;
> >> +			choke_drop_by_idx(q, idx);
> >> +			sch->qstats.backlog -= qdisc_pkt_len(skb);
> >> +			--sch->q.qlen;
> >> +			qdisc_drop(oskb, sch);
> > 
> > You need to adjust the qlen values of parent qdiscs by calling
> > qdisc_tree_decrease_qlen(), they are not aware that a second
> > packet has been dropped.
> 
> I just saw that Eric already fixed this :)
> --

Thanks Patrick, I did that in choke_change() only, not on this part of
the code.


qdisc cbq 1: root refcnt 2 rate 1000Mbit cell 8b (bounded,isolated) prio no-transmit/8 weight 1000Mbit allot 1514b 
level 2 ewma 5 avpkt 1000b maxidle 0us 
 Sent 92016573 bytes 167811 pkt (dropped 615544, overlimits 982637 requeues 0) 
 rate 6248bit 9pps backlog 0b 191202p requeues 0 
  borrowed 0 overactions 0 avgidle 125 undertime 0
qdisc choke 11: parent 1:11 limit 130000b min 10833b max 32500b ewma 13 Plog 21 Scell_log 30
 Sent 91969929 bytes 167257 pkt (dropped 806746, overlimits 424342 requeues 0) 
 rate 56bit 0pps backlog 0b 0p requeues 0 
  marked 0 early 424342 pdrop 0 other 0 matched 191202


So yes : we see 191202 were CHOKed, and upper cbq leaks 191202 packets in 'backlog'

After following patch :

diff --git a/net/sched/sch_choke.c b/net/sched/sch_choke.c
index 29a91d8..5479f7e 100644
--- a/net/sched/sch_choke.c
+++ b/net/sched/sch_choke.c
@@ -223,6 +223,7 @@ static int choke_enqueue(struct sk_buff *skb, struct Qdisc *sch)
 			q->stats.matched++;
 			choke_drop_by_idx(q, idx);
 			sch->qstats.backlog -= qdisc_pkt_len(oskb);
+			qdisc_tree_decrease_qlen(sch, 1);
 			--sch->q.qlen;
 			qdisc_drop(oskb, sch);
 			goto congestion_drop;

Everything seems fine :

qdisc cbq 1: root refcnt 2 rate 1000Mbit cell 8b (bounded,isolated) prio no-transmit/8 weight 1000Mbit allot 1514b 
level 2 ewma 5 avpkt 1000b maxidle 0us 
 Sent 93962148 bytes 170940 pkt (dropped 633053, overlimits 1010490 requeues 0) 
 rate 568bit 1pps backlog 0b 0p requeues 0 
  borrowed 0 overactions 0 avgidle 125 undertime 0
qdisc choke 11: parent 1:11 limit 130000b min 10833b max 32500b ewma 13 Plog 21 Scell_log 30
 Sent 93957621 bytes 170888 pkt (dropped 829160, overlimits 436946 requeues 0) 
 rate 104bit 0pps backlog 0b 0p requeues 0 
  marked 0 early 436946 pdrop 0 other 0 matched 196107



  reply	other threads:[~2011-01-14 14:24 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-13 17:27 [PATCH] CHOKe flow scheduler (0.7) Stephen Hemminger
2011-01-13 17:48 ` [PATCH] CHOKe flow scheduler (iproute) Stephen Hemminger
2011-01-13 21:01   ` Eric Dumazet
2011-01-13 18:00 ` [PATCH] CHOKe flow scheduler (0.7) Eric Dumazet
2011-01-13 18:02   ` Eric Dumazet
2011-01-13 20:37 ` Eric Dumazet
2011-01-13 23:34   ` [PATCH] CHOKe flow scheduler (0.8) Stephen Hemminger
2011-01-14  3:29     ` Eric Dumazet
2011-01-14  3:34       ` Eric Dumazet
2011-01-14  3:58         ` Eric Dumazet
2011-01-14 11:32           ` Eric Dumazet
2011-01-14 13:54     ` Patrick McHardy
2011-01-14 13:55       ` Patrick McHardy
2011-01-14 14:24         ` Eric Dumazet [this message]
2011-01-14 23:45           ` [PATCH] CHOKe flow scheduler (0.9) Stephen Hemminger
2011-01-15  7:45             ` Eric Dumazet
2011-01-17 17:25               ` Stephen Hemminger
2011-01-17 17:54                 ` Eric Dumazet
2011-01-18 19:06                   ` Stephen Hemminger
2011-01-18 19:34                     ` Eric Dumazet
2011-01-20 17:38                       ` [PATCH] CHOKe flow scheduler (0.10) Stephen Hemminger
2011-01-20 18:19                         ` Eric Dumazet
2011-01-20 22:46                           ` Eric Dumazet
2011-02-03  1:21                             ` [PATCH net-next] CHOKe flow scheduler (0.11) Stephen Hemminger
2011-02-03  1:59                               ` Eric Dumazet
2011-02-03  4:53                                 ` 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=1295015043.3937.20.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.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