[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1711591930.8288093-2-xuanzhuo@linux.alibaba.com>
Date: Thu, 28 Mar 2024 10:12:10 +0800
From: Xuan Zhuo <xuanzhuo@...ux.alibaba.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Heng Qi <hengqi@...ux.alibaba.com>,
<netdev@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>,
Vladimir Oltean <vladimir.oltean@....com>,
"David S. Miller" <davem@...emloft.net>,
Jason Wang <jasowang@...hat.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
vadim.fedorenko@...ux.dev,
Alexander Lobakin <aleksander.lobakin@...el.com>
Subject: Re: [PATCH net-next v2 2/2] virtio-net: support dim profile fine-tuning
On Wed, 27 Mar 2024 17:32:58 -0700, Jakub Kicinski <kuba@...nel.org> wrote:
> On Wed, 27 Mar 2024 15:45:50 +0100 Alexander Lobakin wrote:
> > > +/* This is copied from NET_DIM_RX_EQE_PROFILES in DIM library */
> > > +#define VIRTNET_DIM_RX_PKTS 256
> > > +static struct dim_cq_moder rx_eqe_conf[] = {
> > > + {.usec = 1, .pkts = VIRTNET_DIM_RX_PKTS,},
> > > + {.usec = 8, .pkts = VIRTNET_DIM_RX_PKTS,},
> > > + {.usec = 64, .pkts = VIRTNET_DIM_RX_PKTS,},
> > > + {.usec = 128, .pkts = VIRTNET_DIM_RX_PKTS,},
> > > + {.usec = 256, .pkts = VIRTNET_DIM_RX_PKTS,}
> > > +};
> >
> > This is wrong.
> > This way you will have one global table for ALL the virtio devices in
> > the system, while Ethtool performs configuration on a per-netdevice basis.
> > What you need is to have 1 dim_cq_moder per each virtio netdevice,
> > embedded somewhere into its netdev_priv(). Then
> > virtio_dim_{rx,tx}_work() will take profiles from there, not the global
> > struct. The global struct can stay here as const to initialize default
> > per-netdevice params.
>
> I've been wondering lately if adaptive IRQ moderation isn't exactly
> the kind of heuristic we would be best off deferring to BPF.
> I have done 0 experiments -- are the thresholds enough
> or do more interesting algos come to mind for anyone?
Yes, we are working on this as well.
For netdim, I think profiles are an aspect. In many cases, this can solve many
problems.
It is a good idea to introduce bpf, but what bpf should do is some logical
situations that are not universal. In our practice, modifying profiles can solve
most situations. We also have a small number of scenarios that cannot be handled,
and we hope to use ebpf to solve them.
Thanks.
Powered by blists - more mailing lists