From: "Michael S. Tsirkin" <mst@redhat.com>
To: zhenwei pi <pizhenwei@bytedance.com>
Cc: xuanzhuo@linux.alibaba.com, linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org,
Christoph Hellwig <hch@infradead.org>,
stefanha@redhat.com
Subject: Re: Re: Re: [PATCH v2 1/2] virtio: abstract virtqueue related methods
Date: Thu, 18 May 2023 06:09:14 -0400 [thread overview]
Message-ID: <20230518060656-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <ee2a975f-0aa6-a46a-e9d2-7f82e313347f@bytedance.com>
On Thu, May 18, 2023 at 08:47:22AM +0800, zhenwei pi wrote:
> On 5/17/23 18:39, Michael S. Tsirkin wrote:
> > On Wed, May 17, 2023 at 04:35:55PM +0800, zhenwei pi wrote:
> > >
> > >
> > > On 5/17/23 15:46, Christoph Hellwig wrote:
> > > > On Wed, May 17, 2023 at 03:43:03PM +0800, zhenwei pi wrote:
> > > > > I have a plan to introduce 'Virtio Over Fabrics'(TCP&RDMA) as Virtio
> > > > > transport, as mentioned in cover letter of this series:
> > > > > 3 weeks ago, I posted a proposal 'Virtio Over Fabrics':
> > > > > https://lists.oasis-open.org/archives/virtio-comment/202304/msg00442.html
> > > >
> > > > Just don't do it. Please define your own protocols over RDMA or TCP
> > > > for exactly the operations you need (for many they will already exist)
> > > > instead of piggyg backing on virtio and making everyone else pay the
> > > > price.
> > > >
> > >
> > > Hi
> > >
> > > 1, `virtqueue_add_inbuf` in current version:
> > > static inline int virtqueue_add_inbuf(struct virtqueue *vq,
> > > struct scatterlist *sg,
> > > unsigned int num,
> > > void *data,
> > > gfp_t gfp)
> > > {
> > > if (likely(!vq->abstract))
> > > return vring_virtqueue_add_sgs(vq, &sg, num, 0, 1, data,
> > > NULL, gfp);
> > >
> > > return vq->add_sgs(vq, &sg, num, 0, 1, data, NULL, gfp);
> > > }
> > >
> > > And disassemble 'virtinput_queue_evtbuf':
> > > static void virtinput_queue_evtbuf(struct virtio_input *vi,
> > > struct virtio_input_event *evtbuf)
> > > {
> > > struct scatterlist sg[1];
> > >
> > > sg_init_one(sg, evtbuf, sizeof(*evtbuf));
> > > virtqueue_add_inbuf(vi->evt, sg, 1, evtbuf, GFP_ATOMIC);
> > > }
> > >
> > > I notice that two instructions are newly added for vring like:
> > > 24d: 80 78 35 00 cmpb $0x0,0x35(%rax)
> > > 251: 75 3f jne 292
> > >
> > > Is it an expensive price...
> >
> > Can we somehow only override the kick method?
> > Then take the ring and send it over ...
> >
>
> Could you please take a look at this code?
> https://github.com/pizhenwei/linux/blob/virtio-of-github/drivers/virtio/virtio_fabrics.c#LL861C13-L861C23
what am I looking at here?
Looks like at least vof_handle_vq duplicates some code from vringh.
But besides that yes, that's the idea.
> >
> > > 2, Storage/FS specific remote protocol is quite popular, otherwise I'm not
> > > familiar with other device protocols. For example, I need a remote crypto
> > > device to accelerate HTTPS ... With Virtio Over Fabrics, I have a chance to
> > > attach a virtio-crypto device to do this work.
> > >
> > > --
> > > zhenwei pi
> >
>
> --
> zhenwei pi
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next prev parent reply other threads:[~2023-05-18 10:09 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-17 2:54 [PATCH v2 0/2] virtio: abstract virtqueue related methods zhenwei pi via Virtualization
2023-05-17 2:54 ` [PATCH v2 1/2] " zhenwei pi via Virtualization
2023-05-17 6:57 ` kernel test robot
2023-05-17 7:10 ` kernel test robot
2023-05-17 7:39 ` Christoph Hellwig
2023-05-17 7:43 ` zhenwei pi via Virtualization
2023-05-17 7:46 ` Christoph Hellwig
2023-05-17 8:35 ` zhenwei pi via Virtualization
2023-05-17 10:39 ` Michael S. Tsirkin
2023-05-18 0:47 ` zhenwei pi via Virtualization
2023-05-18 10:09 ` Michael S. Tsirkin [this message]
2023-05-18 11:01 ` zhenwei pi via Virtualization
2023-05-17 17:59 ` kernel test robot
2023-05-17 2:54 ` [PATCH v2 2/2] tools/virtio: implement virtqueue in test zhenwei pi via Virtualization
2023-05-17 3:46 ` [PATCH v2 0/2] virtio: abstract virtqueue related methods Michael S. Tsirkin
2023-05-17 3:51 ` zhenwei pi via Virtualization
2023-05-17 3:57 ` Michael S. Tsirkin
2023-05-17 4:58 ` zhenwei pi via Virtualization
2023-05-17 6:10 ` Michael S. Tsirkin
2023-05-17 6:21 ` zhenwei pi via Virtualization
2023-05-17 10:13 ` 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=20230518060656-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pizhenwei@bytedance.com \
--cc=stefanha@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
--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;
as well as URLs for NNTP newsgroup(s).