From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Stephen Hemminger" <stephen@networkplumber.org>
Cc: <maxime.coquelin@redhat.com>, <chenbox@nvidia.com>, <dev@dpdk.org>
Subject: RE: [PATCH v5] virtio: optimize stats counters performance
Date: Thu, 1 Aug 2024 22:38:07 +0200 [thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F5EE@smartserver.smartshare.dk> (raw)
In-Reply-To: <20240801091735.66ae4871@hermes.local>
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Thursday, 1 August 2024 18.18
>
> On Thu, 1 Aug 2024 16:03:12 +0000
> Morten Brørup <mb@smartsharesystems.com> wrote:
>
> > Optimized the performance of updating the virtio statistics counters
> by
> > reducing the number of branches.
> >
> > Ordered the packet size comparisons according to the probability with
> > typical internet traffic mix.
> >
> > Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
>
> LGTM
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
>
> I wonder if other software drivers could use similar counters?
While working on this, I noticed the netvsc driver and vhost lib also have size_bins [1], so they are likely candidates.
The netvsc's hn_update_packet_stats() function [2] seems like 100 % copy-paste, and should be easy to paste over with the new implementation.
The vhost lib's vhost_queue_stats_update() function [3] also looks rather similar to the original variant, and could benefit too.
[1]: https://elixir.bootlin.com/dpdk/v24.07/A/ident/size_bins
[2]: https://elixir.bootlin.com/dpdk/v24.07/source/drivers/net/netvsc/hn_rxtx.c#L108
[3]: https://elixir.bootlin.com/dpdk/v24.07/source/lib/vhost/virtio_net.c#L56
I'll take a look around and add similar patches for what I find. Thanks for the reminder.
next prev parent reply other threads:[~2024-08-01 20:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-31 13:17 [PATCH] " Morten Brørup
2024-07-31 14:04 ` [PATCH v2] " Morten Brørup
2024-07-31 15:13 ` [PATCH v3] " Morten Brørup
2024-07-31 22:58 ` [PATCH v4] " Morten Brørup
2024-07-31 23:45 ` Stephen Hemminger
2024-07-31 23:51 ` Morten Brørup
2024-08-01 16:03 ` [PATCH v5] " Morten Brørup
2024-08-01 16:17 ` Stephen Hemminger
2024-08-01 20:38 ` Morten Brørup [this message]
2024-08-02 14:49 ` Morten Brørup
2024-08-02 2:23 ` lihuisong (C)
2024-08-02 2:42 ` Stephen Hemminger
2024-08-02 3:17 ` lihuisong (C)
2024-08-02 11:27 ` Morten Brørup
2024-08-05 1:14 ` lihuisong (C)
2024-08-05 1:19 ` lihuisong (C)
2024-08-06 8:23 ` Chenbo Xia
2024-09-10 15:01 ` Maxime Coquelin
2024-09-19 12:04 ` Maxime Coquelin
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=98CBD80474FA8B44BF855DF32C47DC35E9F5EE@smartserver.smartshare.dk \
--to=mb@smartsharesystems.com \
--cc=chenbox@nvidia.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
--cc=stephen@networkplumber.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).