netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jamal Hadi Salim <jhs@mojatatu.com>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: [Patch net-next 2/4] net_sched: update hierarchical backlog too
Date: Fri, 16 Oct 2015 08:22:15 -0400	[thread overview]
Message-ID: <5620EBF7.6080602@mojatatu.com> (raw)
In-Reply-To: <CAM_iQpWmxhY9Y9PU+9kYYvoc2C07aTxMPxSny1pW+cVYu4TqGQ@mail.gmail.com>

On 10/15/15 00:32, Cong Wang wrote:
> On Wed, Oct 14, 2015 at 5:11 AM, Jamal Hadi Salim <jhs@mojatatu.com> wrote:
>> On 10/12/15 14:38, Cong Wang wrote:
>>>
>>> When the bottom qdisc decides to, for example, drop some packet,
>>> it calls qdisc_tree_decrease_qlen() to update the queue length
>>> for all its ancestors, we need to update the backlog too to
>>> keep the stats on root qdisc accurate.
>>>
>>
>>
>> There is more than one change in there (the codel change seems
>> out of place and i wasnt sure why it was needed).
>
> I thought it is clear that when codel decides to drop some packets
> we don't know how many bytes it drops, we only know how many
> packets before my patch. For example,
>
> -               qdisc_tree_decrease_qlen(sch, q->cstats.drop_count);
> +               qdisc_tree_reduce_backlog(sch, q->cstats.drop_count,
> +                                         q->cstats.drop_len);
>
> This clearly means I need some codel stats from codel to pass to
> qdisc_tree_reduce_backlog(), this is  why the codel part is
> necessary.
>
>
>> Also it seems possible you are double-dipping in some cases;
>> i dont have time to scrutinize - but looking at codel_change() change
>> when the queue limit is exceeded you will end up affecting backlog from
>> both qdisc_qstats_backlog_dec() and your new
>> qdisc_tree_reduce_backlog()
>
> Nope, qdisc_qstats_backlog_dec() decreases the backlog of itself,
> qdisc_tree_reduce_backlog() decreases its upper qdiscs'. It is correct
> as it was.
>

Didnt look closer - will take your word for it.

Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>


cheers,
jamal

  reply	other threads:[~2015-10-16 12:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-12 18:37 [Patch net-next 0/4] net_sched: update backlog for hierarchical qdisc's Cong Wang
2015-10-12 18:38 ` [Patch net-next 1/4] net_sched: introduce qdisc_replace() helper Cong Wang
2015-10-14  1:54   ` David Miller
2015-10-15  4:13     ` Cong Wang
2015-10-14 11:56   ` Jamal Hadi Salim
2015-10-15  4:15     ` Cong Wang
2015-10-16 11:51       ` Jamal Hadi Salim
2015-10-12 18:38 ` [Patch net-next 2/4] net_sched: update hierarchical backlog too Cong Wang
2015-10-14 12:11   ` Jamal Hadi Salim
2015-10-15  4:32     ` Cong Wang
2015-10-16 12:22       ` Jamal Hadi Salim [this message]
2015-10-12 18:38 ` [Patch net-next 3/4] sch_htb: update backlog as well Cong Wang
2015-10-14 12:25   ` Jamal Hadi Salim
2015-10-15  4:21     ` Cong Wang
2015-10-16 12:19       ` Jamal Hadi Salim
2015-10-19 20:46         ` Cong Wang
2015-10-12 18:38 ` [Patch net-next 4/4] sch_dsmark: " Cong Wang

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=5620EBF7.6080602@mojatatu.com \
    --to=jhs@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.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;
as well as URLs for NNTP newsgroup(s).