netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dust Li <dust.li@linux.alibaba.com>
To: David Miller <davem@davemloft.net>
Cc: jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us,
	john.fastabend@gmail.com, tonylu@linux.alibaba.com,
	netdev@vger.kernel.org
Subject: Re: [PATCH] net: sched: keep __gnet_stats_copy_xxx() same semantics for percpu stats
Date: Mon, 2 Dec 2019 19:17:05 +0800	[thread overview]
Message-ID: <6681fcbd-938a-0028-1e09-0290d63d55fe@linux.alibaba.com> (raw)
In-Reply-To: <20191130.122239.1812288224681402502.davem@davemloft.net>


On 12/1/19 4:22 AM, David Miller wrote:
> From: Dust Li <dust.li@linux.alibaba.com>
> Date: Thu, 28 Nov 2019 14:30:48 +0800
>
>> __gnet_stats_copy_basic/queue() support both percpu stat and
>> non-percpu stat, but they are handle in a different manner:
>> 1. For percpu stat, percpu stats are added to the return value;
>> 2. For non-percpu stat, non-percpu stats will overwrite the
>>     return value;
>> We should keep the same semantics for both type.
>>
>> This patch makes percpu stats follow non-percpu's manner by
>> reset the return bstats before add the percpu bstats to it.
>> Also changes the caller in sch_mq.c/sch_mqprio.c to make sure
>> they dump the right statistics for percpu qdisc.
>>
>> One more thing, the sch->q.qlen is not set with nonlock child
>> qdisc in mq_dump()/mqprio_dump(), add that.
>>
>> Fixes: 22e0f8b9322c ("net: sched: make bstats per cpu and estimator RCU safe")
>> Signed-off-by: Dust Li <dust.li@linux.alibaba.com>
>> Signed-off-by: Tony Lu <tonylu@linux.alibaba.com>
> You are changing way too many things at one time here.
>
> Fix one bug in one patch, for example just fix the missed
> initialization of the per-cpu stats.
>
> The qlen fix is another patch.
>
> And so on and so forth.
>
> Thank you.

OK, I will separate them. Thanks for review !


Thanks.

Dust Li


      reply	other threads:[~2019-12-02 11:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-28  6:30 [PATCH] net: sched: keep __gnet_stats_copy_xxx() same semantics for percpu stats Dust Li
2019-11-30  5:44 ` Cong Wang
2019-12-02 11:15   ` Dust Li
2019-11-30 20:22 ` David Miller
2019-12-02 11:17   ` Dust Li [this message]

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=6681fcbd-938a-0028-1e09-0290d63d55fe@linux.alibaba.com \
    --to=dust.li@linux.alibaba.com \
    --cc=davem@davemloft.net \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=john.fastabend@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=tonylu@linux.alibaba.com \
    --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).