public inbox for virtio-comment@lists.linux.dev
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: Si-Wei Liu <si-wei.liu@oracle.com>,
	Heng Qi <hengqi@linux.alibaba.com>,
	Halil Pasic <pasic@linux.ibm.com>,
	Cornelia Huck <cohuck@redhat.com>,
	"virtio-comment@lists.linux.dev" <virtio-comment@lists.linux.dev>,
	Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	Parav Pandit <parav@nvidia.com>
Subject: Re: [PATCH v5] virtio-net: clarify coalescing parameters settings
Date: Tue, 25 Jun 2024 04:06:25 -0400	[thread overview]
Message-ID: <20240625040500-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CACGkMEvFmh-xq5TWqf16YMPSVkmz1BfKcuR7H9vw1zmouD-kZw@mail.gmail.com>

On Tue, Jun 25, 2024 at 03:53:33PM +0800, Jason Wang wrote:
> On Sat, Jun 22, 2024 at 7:46 AM Si-Wei Liu <si-wei.liu@oracle.com> wrote:
> >
> >
> >
> > On 6/20/2024 8:24 PM, Heng Qi wrote:
> > > On Thu, 20 Jun 2024 18:21:03 -0700, "Si-Wei Liu" <si-wei.liu@oracle.com> wrote:
> > >>
> > >> On 6/20/2024 12:40 AM, Heng Qi wrote:
> > >>> On Mon, 17 Jun 2024 16:31:25 -0700, "Si-Wei Liu" <si-wei.liu@oracle.com> wrote:
> > >>>> On 6/16/2024 7:27 PM, Heng Qi wrote:
> > >>>>> On Thu, 13 Jun 2024 02:13:50 -0400, "Michael S. Tsirkin" <mst@redhat.com> wrote:
> > >>>>>> On Tue, Jun 11, 2024 at 05:43:18PM +0000, Parav Pandit wrote:
> > >>>>>>>> From: Michael S. Tsirkin <mst@redhat.com>
> > >>>>>>>> Sent: Tuesday, June 11, 2024 10:00 PM
> > >>>>>>>> How we can we make progress with
> > >>>>>>>> the realease but sure we don't make backwards compat a pain?
> > >>>>>>>>
> > >>>>>>>> Ideas?
> > >>>>>>>>
> > >>>>>>> There is no functional break with this relaxation.
> > >>>>>>> Device set some non-zero defaults and driver didn't modify them....
> > >>>>>>> Anything broken? Unlikely.
> > >>>> Generally it's inappropriate to leave this decision making to the device
> > >>>> for what would be the best / most performant default config, as the
> > >>>> device is generally considered agnostic to the guest load...
> > >>> Instead, the performance of the virtual machine and the driver depends heavily
> > >>> on how the device is implemented, just as we have proposed various ways to
> > >>> offload the data queue in the device to the hardware. The reason why most
> > >>> devices use software to simulate ctrlq instead of using hardware offload is
> > >>> that the driver has no requirements for the performance of ctrlq before, that is,
> > >>> the device implementation is responsible for and meets the driver's performance
> > >>> requirements.
> > >> I am not sure I follow the arguments of ctrlq being s/w or h/w, I
> > >> thought that it was for the debate why we need coalescing on hardware
> > >> offload device in the first place, instead of reusing event index or
> > >> similar s/w based notification suppression. I don't doubt the value of
> > >> coalescing, but how's it relevant to the default value disposition?
> > >> Generally the default config disposition is not considered to be part of
> > >> device implementation, especially when it comes to the situation where
> > >> device can't easily figure out the specific workload to occur in the
> > >> guest, and there's no perfect single default value that could meet every
> > >> single performance metric across the board. This is a typical tuning
> > >> knob left up to the user to adjust, why the device or driver needs to
> > >> set or load the initial value? The driver just needs to start with
> > >> certain value, be it 0 or non-zero, which guest user can override at any
> > >> point of time, depending on his/her need, and that's it! I guess I still
> > >> don't understand your user case here, why device / driver default is of
> > >> such importance.
> > > I've explained that, and I understand your argument is why default value is needed,
> > > and users should be able to adjust them, right?
> > Sounds about right. You'll soon realize that there's no perfect default
> > that could work with everyone - in that it's just a static value to
> > begin with, no matter whatever initial value the device comes up with,
> > one user or another will come over to you and complain that what is
> > loaded from the device doesn't match the workload they have, so those
> > users are still expected to adjust manually tweaking for their own. As
> > long as it's a tunable that guest user can control and override anytime,
> > I don't feel it too much different what initial config the device would
> > start with.
> 
> Think hard of these, I think there's probably no conflict between the
> points of each.
> 
> Generally, it's very hard to have a default value for virtio-net moderation as
> 
> 1) various implementations of virtio-net
> 2) various setups of virtio-net (from virtual to physical, from 1G to 100G)
> 3) various kind of workloads
> 
> But it doesn't mean the device can not have something by default which
> the vendor thinks it works well for in most cases. And anyhow the
> value could be overridden by the driver if it wants (e.g several Linux
> networking drivers will try to set a good default moderation value
> during probe).
> 
> Thanks

Do we want to just burn a feature bit on this then?
I also think we need to have a way to reset to that
default value. Maybe setting #packets to 0 should do that?


-- 
MST


  reply	other threads:[~2024-06-25  8:06 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-28  4:47 [PATCH v5] virtio-net: clarify coalescing parameters settings Heng Qi
2024-05-28  4:50 ` Heng Qi
2024-05-31  6:36   ` Heng Qi
2024-05-31  9:39     ` Cornelia Huck
2024-06-07 20:02 ` Halil Pasic
2024-06-08  2:34   ` Heng Qi
2024-06-10 12:46     ` Halil Pasic
2024-06-10 13:35       ` Heng Qi
2024-06-10 14:50         ` Michael S. Tsirkin
2024-06-10 15:12           ` Parav Pandit
2024-06-11 14:04           ` Cornelia Huck
2024-06-10 20:19         ` Halil Pasic
2024-06-11 10:40           ` Heng Qi
2024-06-11 16:29             ` Michael S. Tsirkin
2024-06-11 17:43               ` Parav Pandit
2024-06-13  6:13                 ` Michael S. Tsirkin
2024-06-17  2:27                   ` Heng Qi
2024-06-17 23:31                     ` Si-Wei Liu
2024-06-20  7:40                       ` Heng Qi
2024-06-21  1:21                         ` Si-Wei Liu
2024-06-21  3:24                           ` Heng Qi
2024-06-21 23:46                             ` Si-Wei Liu
2024-06-22  1:34                               ` Heng Qi
2024-06-25  4:51                                 ` Si-Wei Liu
2024-06-25  5:56                                   ` Parav Pandit
2024-06-26  1:14                                     ` Si-Wei Liu
2024-06-27 10:37                                       ` Halil Pasic
2024-06-27 11:27                                         ` Parav Pandit
2024-06-27 12:35                                         ` Michael S. Tsirkin
2024-06-27 12:45                                           ` Parav Pandit
2024-06-27 12:52                                             ` Michael S. Tsirkin
2024-06-27 13:03                                               ` Parav Pandit
2024-06-27 14:59                                                 ` Michael S. Tsirkin
2024-06-27 17:27                                               ` Si-Wei Liu
2024-06-27 17:14                                           ` Si-Wei Liu
2024-06-27 22:18                                             ` Michael S. Tsirkin
2024-06-28  6:56                                               ` Si-Wei Liu
2024-06-28  8:23                                                 ` Jason Wang
2024-06-28 19:31                                                   ` Si-Wei Liu
2024-06-30 17:04                                                     ` Michael S. Tsirkin
2024-07-03  6:09                                                     ` Jason Wang
2024-07-02 20:37                                                   ` Halil Pasic
2024-07-02 21:04                                                     ` Michael S. Tsirkin
2024-07-03  5:01                                                     ` Jason Wang
2024-06-29  6:47                                           ` Halil Pasic
2024-06-30 16:55                                             ` Michael S. Tsirkin
2024-07-02 21:43                                               ` Halil Pasic
2024-06-27 12:13                                       ` Parav Pandit
2024-06-27 12:42                                         ` Michael S. Tsirkin
2024-06-25  7:53                               ` Jason Wang
2024-06-25  8:06                                 ` Michael S. Tsirkin [this message]
2024-06-25  8:13                                   ` Jason Wang
2024-06-25  8:21                                     ` Michael S. Tsirkin
2024-06-11 23:03 ` Michael S. Tsirkin
2024-06-17  2:35   ` Heng Qi
2024-06-25  7:26     ` Michael S. Tsirkin

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=20240625040500-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=hengqi@linux.alibaba.com \
    --cc=jasowang@redhat.com \
    --cc=parav@nvidia.com \
    --cc=pasic@linux.ibm.com \
    --cc=si-wei.liu@oracle.com \
    --cc=virtio-comment@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.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