All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Garzarella <sgarzare@redhat.com>
To: "Jiang Wang ." <jiang.wang@bytedance.com>
Cc: cong.wang@bytedance.com,
	Xiongchun Duan <duanxiongchun@bytedance.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	cohuck@redhat.com, virtualization@lists.linux-foundation.org,
	xieyongji@bytedance.com, Stefan Hajnoczi <stefanha@redhat.com>,
	Arseny Krasnov <arseny.krasnov@kaspersky.com>
Subject: Re: [RFC v2] virtio-vsock: add description for datagram type
Date: Mon, 10 May 2021 16:50:55 +0200	[thread overview]
Message-ID: <20210510145055.y7mxqaq4zggajz5a@steredhat> (raw)
In-Reply-To: <CAP_N_Z9yZ4ydXaEn1e=70pDh3FyDjrrxgzis4YTfyDoZ5c8k+g@mail.gmail.com>

On Fri, May 07, 2021 at 09:53:19AM -0700, Jiang Wang . wrote:
>Hi guys,
>
>I have one question about adding two new virtqueues for dgram. One new
>thought is that we don't add two new virtqueues but keep using existing
>virtqueues for both stream and dgram.
>
>At the beginning when I first thought about supporting dgram, I thought
>adding two new virtqueues would be easier and have better performance.
>But now, after the prototype is done, I think that to keep using
>existing virtqueues is also not complicated and could in fact be simpler.
>The performance difference may not be very big.

I honestly didn't think it was easier to use two new queues, quite the 
opposite.

>
>Original code has about 3 places which have assumptions about the
>virtqueues are only used by the stream. But we can change those codes.
>One place is to check pkt len. We can check only for stream pkts.
>Another two are in tx and rx code path where if queued replies pkts are
>too much, the code will stop the rx queue and resume later. We can keep
>that same logic. The dgram will be affected a little bit but that should
>be fine I think. Are there any other places that we should fix?

Did you take a look at Arseny's series?
I think he's already found the places where to check the type and it 
seems to me they are the places you listed.

>
>In short, the virtqueues are in a lower level and can support multiple
>flows and socket types. Use existing virtqueues also make it more
>compatible with old versions.

It's not clear to me how compatibility is improved. Can you elaborate on 
this?

>
>What do you guys think? I remember Stefano mentioned that we should add
>two new virtqueues for dgram. Stefano, do you have some specific reasons
>for that? Could we just keep using existing virtqueues? Thanks.
>

My biggest concern was about the credit mechanism for datagrams. I mean 
avoiding datagrams from crowding the queue without limits, preventing 
streams from communicating.

If you've found a way to limit datagram traffic, then maybe it's doable.

Thanks,
Stefano

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

  reply	other threads:[~2021-05-10 14:51 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01  4:36 [RFC v2] virtio-vsock: add description for datagram type jiang.wang
2021-04-12 13:50 ` Stefan Hajnoczi
2021-04-12 14:21   ` Stefano Garzarella
2021-04-12 22:42     ` Jiang Wang .
2021-04-13 12:58       ` Stefano Garzarella
2021-04-13 13:16         ` Michael S. Tsirkin
2021-04-13 13:38           ` Stefano Garzarella
2021-04-13 13:50             ` Michael S. Tsirkin
2021-04-13 14:03               ` Stefano Garzarella
2021-04-13 19:58                 ` Michael S. Tsirkin
2021-04-13 22:00                   ` Jiang Wang .
2021-04-14  7:07                     ` Stefano Garzarella
2021-04-14  6:57                   ` Stefano Garzarella
2021-04-14  7:20                     ` Michael S. Tsirkin
2021-04-14  9:38                       ` Stefano Garzarella
2021-04-15  3:15                         ` Jiang Wang .
2021-05-04  3:40                           ` Jiang Wang .
2021-05-04 16:16                             ` Stefano Garzarella
2021-05-04 17:06                               ` Jiang Wang .
2021-05-05 10:49                                 ` Stefano Garzarella
2021-05-05 16:58                                   ` Jiang Wang .
2021-05-07 16:53                                     ` Jiang Wang .
2021-05-10 14:50                                       ` Stefano Garzarella [this message]
2021-05-13 23:26                                         ` Jiang Wang .
2021-05-14 15:17                                           ` Stefano Garzarella
2021-05-14 18:55                                             ` Jiang Wang .
2021-05-17 11:02                                               ` Stefano Garzarella
2021-05-18  6:33                                                 ` Jiang Wang .
2021-05-18 13:02                                                   ` Stefano Garzarella
2021-05-19  4:59                                                     ` Jiang Wang .
2021-06-09  4:31                                                       ` Jiang Wang .
2021-06-09  7:40                                                         ` Stefano Garzarella
2021-04-12 22:39   ` [External] " Jiang Wang .
2021-05-13 14:57     ` Stefan Hajnoczi

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=20210510145055.y7mxqaq4zggajz5a@steredhat \
    --to=sgarzare@redhat.com \
    --cc=arseny.krasnov@kaspersky.com \
    --cc=cohuck@redhat.com \
    --cc=cong.wang@bytedance.com \
    --cc=duanxiongchun@bytedance.com \
    --cc=jiang.wang@bytedance.com \
    --cc=mst@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xieyongji@bytedance.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.