From: David Miller <davem@davemloft.net>
To: fgao@ikuai8.com
Cc: eric.dumazet@gmail.com, cwang@twopensource.com, vijayp@vijayp.ca,
ej@evanjones.ca, pabeni@redhat.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v2 1/1] driver: veth: Refine the statistics codes of veth driver
Date: Thu, 03 Nov 2016 13:18:10 -0400 (EDT) [thread overview]
Message-ID: <20161103.131810.2042355356026457407.davem@davemloft.net> (raw)
In-Reply-To: <CA+6hz4owi2WgeGWd98=8d=Q5DBPY4_ZtYAOgcM1V_0+OU8UHrw@mail.gmail.com>
From: Gao Feng <fgao@ikuai8.com>
Date: Thu, 3 Nov 2016 22:38:28 +0800
> On Thu, Nov 3, 2016 at 10:31 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>> On Thu, 2016-11-03 at 21:39 +0800, Gao Feng wrote:
>>> Hi Eric,
>>>
>>> On Thu, Nov 3, 2016 at 9:30 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>>> > On Thu, 2016-11-03 at 21:03 +0800, fgao@ikuai8.com wrote:
>>> >> From: Gao Feng <fgao@ikuai8.com>
>>> >>
>>> >> The dropped count of veth is located in struct veth_priv, but other
>>> >> statistics like packets and bytes are in another struct pcpu_vstats.
>>> >> Now keep these three counters in the same struct.
>>> >>
>>> >> Signed-off-by: Gao Feng <fgao@ikuai8.com>
>>> >> ---
>>> >> v2: Use right "peer" instead of "dev";
>>> >> v1: Initial version
>>> >
>>> > May I ask : Why ?
>>>
>>> Just because I think statistics should be in the same struct.
>>
>> That is not a good reason then.
>
> Because other net devices put the statistics together.
Organizational "prettyness" is not argument for this change, when the
downsides are fundamentally clear:
1) It is not a fast-path accessed statistic, so the per-cpu'ness is
not important.
2) We aim to minimize the amount of per-cpu data in the kernel because
it is expensive. So when not necessary, as is the case here, we
do not user per-cpu data.
There are no good reasons to make this change, so I am dropping your
patch.
prev parent reply other threads:[~2016-11-03 17:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-03 13:03 [PATCH net-next v2 1/1] driver: veth: Refine the statistics codes of veth driver fgao
2016-11-03 13:30 ` Eric Dumazet
2016-11-03 13:39 ` Gao Feng
2016-11-03 14:31 ` Eric Dumazet
2016-11-03 14:38 ` Gao Feng
2016-11-03 15:07 ` Eric Dumazet
2016-11-03 15:13 ` Gao Feng
2016-11-03 17:18 ` David Miller [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=20161103.131810.2042355356026457407.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=cwang@twopensource.com \
--cc=ej@evanjones.ca \
--cc=eric.dumazet@gmail.com \
--cc=fgao@ikuai8.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vijayp@vijayp.ca \
/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).