netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
To: Jason Wang <jasowang@redhat.com>
Cc: netdev@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, mst@redhat.com
Subject: Re: [PATCH net-next 2/2] virtio-net: get rid of unnecessary container of rq stats
Date: Wed, 1 Aug 2018 10:46:53 +0900	[thread overview]
Message-ID: <840e6834-f64f-56b4-a889-d73e204eacbd@lab.ntt.co.jp> (raw)
In-Reply-To: <d11c65d8-20be-1a85-c687-c6f182264e41@redhat.com>

On 2018/08/01 10:39, Jason Wang wrote:
> On 2018年07月31日 18:02, Toshiaki Makita wrote:
>> On 2018/07/31 18:43, Jason Wang wrote:
>>> We don't maintain tx counters in rx stats any more. There's no need
>>> for an extra container of rq stats.
>>>
>>> Cc: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
>>> Signed-off-by: Jason Wang <jasowang@redhat.com>
>>> ---
>>>   drivers/net/virtio_net.c | 80
>>> ++++++++++++++++++++++--------------------------
>>>   1 file changed, 36 insertions(+), 44 deletions(-)
>>>
>>> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
>>> index 72d3f68..14f661c 100644
>>> --- a/drivers/net/virtio_net.c
>>> +++ b/drivers/net/virtio_net.c
>>> @@ -87,7 +87,8 @@ struct virtnet_sq_stats {
>>>       u64 kicks;
>>>   };
>>>   -struct virtnet_rq_stat_items {
>>> +struct virtnet_rq_stats {
>>> +    struct u64_stats_sync syncp;
>>>       u64 packets;
>>>       u64 bytes;
>>>       u64 drops;
>>> @@ -98,17 +99,8 @@ struct virtnet_rq_stat_items {
>>>       u64 kicks;
>>>   };
>>>   -struct virtnet_rq_stats {
>>> -    struct u64_stats_sync syncp;
>>> -    struct virtnet_rq_stat_items items;
>>> -};
>> I'm not thinking removing sq stat is needed but even if it is I want to
>> keep virtnet_rq_stats to avoid allocating unnecessary u64_stats_syncp on
>> stack in virtnet_receive. I would just remove virtnet_rx_stats if
>> necessary.
> 
> It's a nop on 64bit machines. And an unsigned on 32bit. So it's overhead
> could be ignored I think.

It's not a big problem so that's OK. I just felt like you reverted
unnecessarily too much. Anyway it is already applied and I'm not
thinking of changing this any more.

-- 
Toshiaki Makita

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  reply	other threads:[~2018-08-01  1:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-31  9:43 [PATCH net-next 1/2] virtio-net: correctly update XDP_TX counters Jason Wang
2018-07-31  9:43 ` [PATCH net-next 2/2] virtio-net: get rid of unnecessary container of rq stats Jason Wang
2018-07-31 10:02   ` Toshiaki Makita
2018-08-01  1:39     ` Jason Wang
2018-08-01  1:46       ` Toshiaki Makita [this message]
2018-07-31 11:22   ` Michael S. Tsirkin
2018-07-31 17:03   ` David Miller
2018-07-31  9:57 ` [PATCH net-next 1/2] virtio-net: correctly update XDP_TX counters Toshiaki Makita
2018-08-01  1:31   ` Jason Wang
2018-08-01  1:42     ` Toshiaki Makita
2018-07-31 11:22 ` Michael S. Tsirkin
2018-07-31 17:03 ` 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=840e6834-f64f-56b4-a889-d73e204eacbd@lab.ntt.co.jp \
    --to=makita.toshiaki@lab.ntt.co.jp \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /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).